mbox series

[0/5] fix missing break in list_or_each_entry

Message ID 20220330120246.25580-1-xiam0nd.tong@gmail.com (mailing list archive)
Headers show
Series fix missing break in list_or_each_entry | expand

Message

Xiaomeng Tong March 30, 2022, 12:02 p.m. UTC
Instead of exiting the loop as expected when an entry is found, the
list_for_each_entry() continues until the traversal is complete. It
could lead to invalid reference or set 'is_*' flags mistakely.

To fix this, when an entry is found, add a break to exit the loop.

Xiaomeng Tong (5):
  gma500: fix a missing break in oaktrail_crtc_mode_set
  gma500: fix a missing break in cdv_intel_crtc_mode_set
  gma500: fix a missing break in psb_intel_crtc_mode_set
  gma500: fix a missing break in cdv_intel_dp_set_m_n
  gma500: fix a missing break in psb_driver_load

 drivers/gpu/drm/gma500/cdv_intel_display.c | 2 ++
 drivers/gpu/drm/gma500/cdv_intel_dp.c      | 2 ++
 drivers/gpu/drm/gma500/oaktrail_crtc.c     | 2 ++
 drivers/gpu/drm/gma500/psb_drv.c           | 2 ++
 drivers/gpu/drm/gma500/psb_intel_display.c | 2 ++
 5 files changed, 10 insertions(+)