diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2016-07-12 11:06:52 +0000 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-07-16 10:29:31 -0400 |
commit | 06f3217207766b4bc2e56b88e0736037ae92fd30 (patch) | |
tree | 9be0557e31a7353fb276a4e909210f9126868dd5 /drivers/gpu/drm/msm/hdmi | |
parent | 2ca41c176a5d2197572153bf543a3f758c13a4d3 (diff) | |
download | linux-06f3217207766b4bc2e56b88e0736037ae92fd30.tar.gz linux-06f3217207766b4bc2e56b88e0736037ae92fd30.tar.bz2 linux-06f3217207766b4bc2e56b88e0736037ae92fd30.zip |
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/hdmi')
-rw-r--r-- | drivers/gpu/drm/msm/hdmi/hdmi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 33bf52c6b312..973720792236 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) |