Skip to content

Commit

Permalink
usb: chipidea: ci13xxx_imx: check if 'data->phy_np' is not NULL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Greg Kroah-Hartman committed Jun 17, 2013
1 parent e56ae54 commit 785dabe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/chipidea/ci13xxx_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 785dabe

Please sign in to comment.