From: Wei Yongjun Date: Tue, 12 Jul 2016 11:06:52 +0000 (+0000) Subject: drm/msm/hdmi: use PTR_ERR_OR_ZERO() to simplify the code X-Git-Tag: v4.14-rc1~2738^2~12^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06f3217207766b4bc2e56b88e0736037ae92fd30;p=platform%2Fkernel%2Flinux-rpi.git drm/msm/hdmi: use PTR_ERR_OR_ZERO() to simplify the code Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Wei Yongjun Signed-off-by: Rob Clark --- diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 33bf52c..9737207 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -537,10 +537,7 @@ static int msm_hdmi_register_audio_driver(struct hdmi *hdmi, struct device *dev) PLATFORM_DEVID_AUTO, &codec_data, sizeof(codec_data)); - if (IS_ERR(hdmi->audio_pdev)) - return PTR_ERR(hdmi->audio_pdev); - - return 0; + return PTR_ERR_OR_ZERO(hdmi->audio_pdev); } static int msm_hdmi_bind(struct device *dev, struct device *master, void *data)