mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/gma500: fix a missing break in psb_driver_load
@ 2022-04-01 11:58 Xiaomeng Tong
  2022-04-06  7:27 ` Patrik Jakobsson
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaomeng Tong @ 2022-04-01 11:58 UTC (permalink / raw)
  To: patrik.r.jakobsson
  Cc: airlied, daniel, dri-devel, linux-kernel, Xiaomeng Tong

Instead of exiting the loop as expected when an entry is found, the
list_for_each_entry() continues until the traversal is complete. To
avoid potential executing 'ret = gma_backlight_init(dev);' repeatly,
break the loop when the entry is found.

Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
---
 drivers/gpu/drm/gma500/psb_drv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 2aff54d505e2..b61a8b0eea38 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -402,6 +402,9 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
 			ret = gma_backlight_init(dev);
 			break;
 		}
+
+		if (!ret)
+			break;
 	}
 	drm_connector_list_iter_end(&conn_iter);
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-07  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 11:58 [PATCH] drm/gma500: fix a missing break in psb_driver_load Xiaomeng Tong
2022-04-06  7:27 ` Patrik Jakobsson
2022-04-07  1:15   ` Xiaomeng Tong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®