PCI config read functions
Tom Rini
trini at konsulko.com
Fri Jul 4 22:59:05 CEST 2025
On Fri, Jul 04, 2025 at 10:53:55AM +0100, Andrew Goodbody wrote:
> Hi Tom,
>
> Smatch reports that the callers of the functions
> (dm_)pci_config_read(8|16|32) from drivers/pci/pci-uclass.c do not check the
> return value for an error before using the variable that should have been
> assigned with the value read. However in the error path that variable is not
> assigned to and so the code can use an uninitialised variable in that case.
> eg line 1396 in drivers/pci/pci-uclass.c addr may not have been assigned to
> in the error case.
>
> This also seems to be the case with callers from other files as well.
>
> Would a patch that adds a default assignment before returning an error to
> the affected functions be accepted?
Can you please check the size growth on say qemu_arm* and we can go from
there? Thanks.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250704/94a7107b/attachment.sig>
More information about the U-Boot
mailing list