net: ethernet: cavium: octeon: octeon_mgmt: Handle return NULL error from devm_ioremap
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 14 Dec 2016 19:03:30 +0000 (00:33 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Dec 2016 16:03:34 +0000 (11:03 -0500)
commit162809dfc2bfb31eb54dc67733bcdab0f2d1534d
treec299f13fe82353a80863cf3182dc20f2d3732bfe
parent52f40e9d657cc126b766304a5dd58ad73b02ff46
net: ethernet: cavium: octeon: octeon_mgmt: Handle return NULL error from devm_ioremap

Here, If devm_ioremap will fail. It will return NULL.
Kernel can run into a NULL-pointer dereference.
This error check will avoid NULL pointer dereference.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c