diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c index cdd1acd0117e..90cd243070d7 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c @@ -290,9 +290,9 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac, static void dpaa2_pcs_destroy(struct dpaa2_mac *mac) { struct lynx_pcs *pcs = mac->pcs; - struct device *dev = &pcs->mdio->dev; if (pcs) { + struct device *dev = &pcs->mdio->dev; lynx_pcs_destroy(pcs); put_device(dev); mac->pcs = NULL;