]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 27 Mar 2017 08:27:37 +0000 (19:27 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 28 Apr 2017 11:26:53 +0000 (21:26 +1000)
commit4c594b64ecaa5d013fb924d7aff0218ec8c746f3
tree935021c4c48b7d7a3d25223ecc62119b6846ad1d
parentad4cd63f00343ece7112bb014154ba345f16b140
powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc

pnv_pci_table_alloc() ignores possible failure from kzalloc_node(),
this adds a check. There are 2 callers of pnv_pci_table_alloc(),
one already checks for tbl!=NULL, this adds WARN_ON() to the other path
which only happens during boot time in IODA1 and not expected to fail.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/pci.c