]> git.baikalelectronics.ru Git - kernel.git/commit
net: axienet: Fix devm_ioremap_resource return value check
authorKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
Thu, 9 Jul 2015 13:21:20 +0000 (22:21 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jul 2015 04:43:16 +0000 (21:43 -0700)
commit1916fcba82f1fcf04035e3484ec9cc20656338c4
tree014e7870a3f1b8fb28c165b48cf33ee3fa348d0f
parent8aa3e375fc823ac42bd02e322dad017e34b7d840
net: axienet: Fix devm_ioremap_resource return value check

Value returned by devm_ioremap_resource() was checked for non-NULL but
devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
error this could lead to dereference of ERR_PTR.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Cc: <stable@vger.kernel.org>
Fixes: 82d0c6f60ffc ("net: axienet: Use devm_* calls")
Reviewed-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c