summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasyl Gomonovych <gomonovych@gmail.com>2017-11-29 17:20:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-18 16:47:27 +0100
commitbb542006d608d772ec8b5296f3310863b9b882dc (patch)
tree2ea3253f4d76d8c2c7f45d8dfd90b970a9d2bd8d
parentsysfs: Use PTR_ERR_OR_ZERO() (diff)
downloadlinux-bb542006d608d772ec8b5296f3310863b9b882dc.tar.xz
linux-bb542006d608d772ec8b5296f3310863b9b882dc.zip
PNP: pnpbios: Use PTR_ERR_OR_ZERO()
Fix ptr_ret.cocci warnings: drivers/pnp/pnpbios/core.c:584:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/pnp/pnpbios/core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index e681140b85d8..077f334fdbae 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -581,10 +581,7 @@ static int __init pnpbios_thread_init(void)
init_completion(&unload_sem);
task = kthread_run(pnp_dock_thread, NULL, "kpnpbiosd");
- if (IS_ERR(task))
- return PTR_ERR(task);
-
- return 0;
+ return PTR_ERR_OR_ZERO(task);
}
/* Start the kernel thread later: */