]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: chipidea: ci13xxx_imx: check if 'data->phy_np' is not NULL
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 13 Jun 2013 14:59:50 +0000 (17:59 +0300)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:08 +0000 (09:54 +0800)
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>
drivers/usb/chipidea/ci13xxx_imx.c

index 1d2897d765b23540c056c12ba9d43b815c2d1c9c..75f553bae20f80dbdf591da0382350070ed47ce8 100644 (file)
@@ -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);