drivers/gpu/drm/i2c/tda998x_drv.c:1329: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: Jyri Sarha <jsarha@xxxxxx> Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx> --- tda998x_drv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1326,10 +1326,7 @@ static int tda998x_audio_codec_init(stru dev, HDMI_CODEC_DRV_NAME, PLATFORM_DEVID_AUTO, &codec_data, sizeof(codec_data)); - if (IS_ERR(priv->audio_pdev)) - return PTR_ERR(priv->audio_pdev); - - return 0; + return PTR_ERR_OR_ZERO(priv->audio_pdev); } /* I2C driver functions */ -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html