From b35d73b62d2cc245ef32d396535e452c70681bfa Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 13 Jun 2013 17:59:50 +0300 Subject: [PATCH] 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 --- drivers/usb/chipidea/ci13xxx_imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5