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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:14 +0000 (19:48 +0200)
commit2630e187b92af7e59bbb2b9702bbc2ac42b59fec
tree74c30dc53dc8bfdf87e19e2aace0d0de8c3ed8d2
parent67eed62b4dd22d388dbc55ec9b5e0077f67305de
net: freescale: fix potential null pointer dereference

[ Upstream commit 06d2d6431bc8d41ef5ffd8bd4b52cea9f72aed22 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/fsl_pq_mdio.c