diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2013-04-22 04:13:13 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2013-04-29 01:35:32 -0400 |
commit | 1055f49e9953e5a55e8b7d54db19c4b8c1108eec (patch) | |
tree | 7abb5f6e2a9976512dcb27222d4ebc06ccdb1495 | |
parent | 5186fc5e8eda184935467aa84295b2897166fecd (diff) |
drm/exynos: fix wrong return check for platform_device_register_simple
platform_device_register_simple() never returns NULL, but IS_ERR_OR_NULL macro
is used for checking return value in exynos drm driver.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 3da5c2d214d8..488278ccb2a8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -388,7 +388,7 @@ static int __init exynos_drm_init(void) | |||
388 | 388 | ||
389 | exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1, | 389 | exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1, |
390 | NULL, 0); | 390 | NULL, 0); |
391 | if (IS_ERR_OR_NULL(exynos_drm_pdev)) { | 391 | if (IS_ERR(exynos_drm_pdev)) { |
392 | ret = PTR_ERR(exynos_drm_pdev); | 392 | ret = PTR_ERR(exynos_drm_pdev); |
393 | goto out; | 393 | goto out; |
394 | } | 394 | } |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c index 5285509e4b34..6986a1b92885 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c | |||
@@ -56,7 +56,7 @@ int exynos_platform_device_hdmi_register(void) | |||
56 | 56 | ||
57 | exynos_drm_hdmi_pdev = platform_device_register_simple( | 57 | exynos_drm_hdmi_pdev = platform_device_register_simple( |
58 | "exynos-drm-hdmi", -1, NULL, 0); | 58 | "exynos-drm-hdmi", -1, NULL, 0); |
59 | if (IS_ERR_OR_NULL(exynos_drm_hdmi_pdev)) | 59 | if (IS_ERR(exynos_drm_hdmi_pdev)) |
60 | return PTR_ERR(exynos_drm_hdmi_pdev); | 60 | return PTR_ERR(exynos_drm_hdmi_pdev); |
61 | 61 | ||
62 | return 0; | 62 | return 0; |