From: Fabio Estevam Date: Thu, 13 Jun 2013 14:59:50 +0000 (+0300) Subject: usb: chipidea: ci13xxx_imx: check if 'data->phy_np' is not NULL X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b35d73b62d2cc245ef32d396535e452c70681bfa;p=karo-tx-linux.git usb: chipidea: ci13xxx_imx: check if 'data->phy_np' is not NULL Similarly as it is done in ci13xxx_imx_remove(), only calls of_node_put if data->phy_np is not NULL. Signed-off-by: Fabio Estevam Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c index 1d2897d765b2..75f553bae20f 100644 --- a/drivers/usb/chipidea/ci13xxx_imx.c +++ b/drivers/usb/chipidea/ci13xxx_imx.c @@ -232,7 +232,8 @@ static int ci13xxx_imx_remove(struct platform_device *pdev) module_put(data->phy->dev->driver->owner); } - of_node_put(data->phy_np); + if (data->phy_np) + of_node_put(data->phy_np); clk_disable_unprepare(data->clk);