Messages in this thread Patch in this message | | | Date | Fri, 17 Feb 2017 05:44:46 +0800 | From | kbuild test robot <> | Subject | [PATCH] Input: fix ptr_ret.cocci warnings |
| |
drivers/input/mouse/synaptics.c:279: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
CC: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> ---
synaptics.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -276,10 +276,7 @@ static int synaptics_create_intertouch(s pdevinfo.parent = &psmouse->ps2dev.serio->dev; pdev = platform_device_register_full(&pdevinfo); - if (IS_ERR(pdev)) - return PTR_ERR(pdev); - - return 0; + return PTR_ERR_OR_ZERO(pdev); } static int synaptics_remove_intertouch_device(struct device *dev, void *data)
| |