From 00e0d3c3d73f0f99aa6024d42a27f7257f7327dd Mon Sep 17 00:00:00 2001 From: Fengguang Wu Date: Fri, 14 Feb 2014 09:26:07 -0800 Subject: [PATCH] staging: fpgaboot: fix coccinelle warnings drivers/staging/gs_fpgaboot/gs_fpgaboot.c:305:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Insop Song Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c index fee2f6140cae..31a6741f4d3e 100644 --- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c @@ -302,10 +302,7 @@ static int init_driver(void) { firmware_pdev = platform_device_register_simple("fpgaboot", -1, NULL, 0); - if (IS_ERR(firmware_pdev)) - return PTR_ERR(firmware_pdev); - - return 0; + return PTR_ERR_OR_ZERO(firmware_pdev); } static void finish_driver(void) -- 2.30.2