]> git.dujemihanovic.xyz Git - u-boot.git/commit
pci: Handle failed calloc in decode_regions()
authorPierre-Clément Tosi <ptosi@google.com>
Thu, 19 May 2022 16:48:30 +0000 (17:48 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 6 Jun 2022 22:01:21 +0000 (18:01 -0400)
commitf2ebaaa9f38dddddefaf2e616a9fc489fe8b4021
tree87f5365d88bfa8a2df2768a90163b4fb0817e447
parent26f981f295d00351b6f0c69b5317b254b2361cc0
pci: Handle failed calloc in decode_regions()

Add a check for calloc() failing to allocate the requested memory.

Make decode_regions() return an error code.

Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/pci/pci-uclass.c