net: freescale: fix potential null pointer dereference
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 30 May 2017 22:38:43 +0000 (17:38 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 May 2017 18:23:38 +0000 (14:23 -0400)
commit06d2d6431bc8d41ef5ffd8bd4b52cea9f72aed22
tree0c1067f7aa7f91e6a787c0aded43742167b025be
parent1b8f8694bb4992135dac150bf44a6c139e573970
net: freescale: fix potential null pointer dereference

Add NULL check before dereferencing pointer _id_ in order to avoid
a potential NULL pointer dereference.

Addresses-Coverity-ID: 1397995
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fsl_pq_mdio.c