summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2014-02-14 09:26:07 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-14 09:26:07 -0800
commit00e0d3c3d73f0f99aa6024d42a27f7257f7327dd (patch)
tree9301e9aa8ccda06eed2952873ae7ed8b9b2867ac /drivers/staging
parent7a01d05e86fd0501cd2be147b3e20ee56a082651 (diff)
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 <insop.song@gainspeed.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/gs_fpgaboot/gs_fpgaboot.c5
1 files changed, 1 insertions, 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)