summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-06-13 17:59:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 13:45:46 -0700
commit785dabef0cc34d169edf43b5af35a6e5f3f87fd4 (patch)
treee89c2a9d91cd73b357b98e9c539fa64a343d94b2 /drivers/usb/chipidea
parente56ae54ff157701ab811b03cab195d8e5eca6628 (diff)
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 <fabio.estevam@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/ci13xxx_imx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
index 1b100c8e3835..5fac2a1b53e3 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);