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>
{
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)