summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/kmb
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-11-17 08:21:37 +0100
committerSam Ravnborg <sam@ravnborg.org>2020-11-29 23:03:18 +0100
commiteba0d703b3ca5f1f24df3798c936906f2da39058 (patch)
tree3bf939caf6b42a40bfdf6147c3e341cababc512a /drivers/gpu/drm/kmb
parentomapfb: fbcon: remove trailing semicolon in macro definition (diff)
downloadlinux-eba0d703b3ca5f1f24df3798c936906f2da39058.tar.xz
linux-eba0d703b3ca5f1f24df3798c936906f2da39058.zip
drm/kmb: Remove an unnecessary NULL check
The NULL checking isn't done consistently in this function and it leads to a static checker warning: drivers/gpu/drm/kmb/kmb_drv.c:561 kmb_pm_suspend() error: we previously assumed 'drm' could be null (see line 559) Fortunately "drm" cannot be NULL at this point so the check can just be removed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20201117072137.GB1111239@mwanda
Diffstat (limited to 'drivers/gpu/drm/kmb')
-rw-r--r--drivers/gpu/drm/kmb/kmb_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c
index a31a840ce634..66df3aade088 100644
--- a/drivers/gpu/drm/kmb/kmb_drv.c
+++ b/drivers/gpu/drm/kmb/kmb_drv.c
@@ -556,7 +556,7 @@ MODULE_DEVICE_TABLE(of, kmb_of_match);
static int __maybe_unused kmb_pm_suspend(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
- struct kmb_drm_private *kmb = drm ? to_kmb(drm) : NULL;
+ struct kmb_drm_private *kmb = to_kmb(drm);
drm_kms_helper_poll_disable(drm);