[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <9eff854f-92ed-3f09-997f-f81c78a8b5a3@canonical.com>
Date: Fri, 18 Jun 2021 11:26:06 +0100
From: Colin Ian King <colin.king@...onical.com>
To: Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: gma500: issue with continue statement not doing anything useful
Hi,
Static analysis with Coverity has found a rather old issue in
drivers/gpu/drm/gma500/oaktrail_crtc.c with the following commit:
commit 9bd81acdb648509dbbc32d4da0477c9fae0d6a73
Author: Patrik Jakobsson <patrik.r.jakobsson@...il.com>
Date: Mon Dec 19 21:41:33 2011 +0000
gma500: Convert Oaktrail to work with new output handling
The analysis is as follows:
114 /* Find the connector we're trying to set up */
115 list_for_each_entry(connector, &mode_config->connector_list,
head) {
116 if (!connector->encoder || connector->encoder->crtc
!= crtc)
Continue has no effect (NO_EFFECT)useless_continue: Statement
continue does not have any effect.
117 continue;
118 }
119
120 if (!connector) {
121 DRM_ERROR("Couldn't find connector when setting mode");
122 gma_power_end(dev);
123 return;
124 }
Currently it appears the loop just iterates to the end of the list
without doing anything useful. I'm not sure what the original intent
was, so I'm not sure how this should be fixed.
Colin
Powered by blists - more mailing lists