From: kbuild test robot <fengguang.wu@xxxxxxxxx> drivers/bluetooth/btintel.c:416: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 Fixes: 38ca310b0d2c ("Bluetooth: btintel: Add platform device for rfkill signal") CC: Sukumar Ghorai <sukumar.ghorai@xxxxxxxxx> Signed-off-by: kbuild test robot <fengguang.wu@xxxxxxxxx> --- btintel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -413,10 +413,7 @@ static int btintel_probe(struct platform reset_gpio_handler = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(reset_gpio_handler)) - return PTR_ERR(reset_gpio_handler); - - return 0; + return PTR_ERR_OR_ZERO(reset_gpio_handler); } static int btintel_remove(struct platform_device *pdev)