]> git.dujemihanovic.xyz Git - u-boot.git/commit
pci: Fix device_find_first_child() return value handling
authorMarek Vasut <marex@denx.de>
Sun, 16 Jul 2023 15:53:24 +0000 (17:53 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 14 Aug 2023 21:55:52 +0000 (17:55 -0400)
commit8ee830d8983763575aad62c37394ec954a76abc4
tree860aea4c54fbfa4359dfa6f13c437ad513377c80
parentb99c6357877da2829dc7fd73a50048e83abc53e2
pci: Fix device_find_first_child() return value handling

This function only ever returns 0, but may not assign the second
parameter. Same thing for device_find_next_child(). Do not assign
ret to stop proliferation of this misuse.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/pci/pci-uclass.c