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)
commitfcc028c106e5750aa66dc43595b3f29f88801ff0
tree014e7870a3f1b8fb28c165b48cf33ee3fa348d0f
parentfc5778ca3f3c57af53f0c6b6912970f6416a3a5f
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: 46aa27df8853 ("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