From: Dan Carpenter Date: Wed, 28 Jun 2017 12:41:01 +0000 (+0300) Subject: drm/gma500: remove an unneeded NULL check X-Git-Tag: v4.14-rc1~179^2~51^2~111 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=faa8b0b7534aabdc8095eb05310f04eff4024b36;p=thirdparty%2Flinux.git drm/gma500: remove an unneeded NULL check "connector" is the list iterator and it can't be NULL. It causes a static checker warning because we dereference the iterator to get the next item in the list. Let's remove this check. Signed-off-by: Dan Carpenter Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20170628124100.3pw2gyitsfopaib5@mwanda --- diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c index 63c6e08600ae3..531e4450c0009 100644 --- a/drivers/gpu/drm/gma500/mdfld_intel_display.c +++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c @@ -737,11 +737,7 @@ static int mdfld_crtc_mode_set(struct drm_crtc *crtc, sizeof(struct drm_display_mode)); list_for_each_entry(connector, &mode_config->connector_list, head) { - if (!connector) - continue; - encoder = connector->encoder; - if (!encoder) continue;