From 785dabef0cc34d169edf43b5af35a6e5f3f87fd4 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 13 Jun 2013 17:59:50 +0300 Subject: 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 1b100c8..5fac2a1 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); -- cgit v0.10.2