]> git.baikalelectronics.ru Git - kernel.git/commit
of/pci: Fix theoretical NULL dereference
authorRobin Murphy <robin.murphy@arm.com>
Wed, 15 Nov 2017 12:50:06 +0000 (12:50 +0000)
committerRob Herring <robh@kernel.org>
Thu, 16 Nov 2017 17:01:14 +0000 (11:01 -0600)
commit9adcaafde69bd3e3694b8fe5fcad1593fcbf39e9
tree46e46454d7729e1326fb16130f468c96f58ac24b
parent1c1adf5eb6e5ca59c33838886ac80d4a6ac5b5b1
of/pci: Fix theoretical NULL dereference

In the (relatively mechanical) process of adapting the RID-mapping code
to put the resulting ID in an output argument rather than the funtion
return value, we ended up with the debug print using the argument
pointer rather than the local value, which potentially defeats the
earlier NULL check.

Fixes: b92c63b5c536: "of/irq: Break out msi-map lookup (again)"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/of_pci.c