Skip to content
Commit ac2f033a authored by Xiaomeng Tong's avatar Xiaomeng Tong Committed by Patrik Jakobsson
Browse files

drm/gma500: fix a potential repeat execution in psb_driver_load



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,
goto outside the loop when found entry by replacing switch/case with
if statement.

Signed-off-by: default avatarXiaomeng Tong <xiam0nd.tong@gmail.com>
Signed-off-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
[Fixed indentation]
Link: https://patchwork.freedesktop.org/patch/msgid/20220413051105.5612-1-xiam0nd.tong@gmail.com
parent 4ab85930
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment