Skip to content

Commit

Permalink
usb: chipidea: ci_hdrc_imx: remove an unsolicited module_put() call f…
Browse files Browse the repository at this point in the history
…rom ci_hdrc_imx_remove()

This prevents the USB PHY refcount to be decremented below zero upon
unloading the ci-hdrc-imx module.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Lothar Waßmann authored and Greg Kroah-Hartman committed Aug 14, 2013
1 parent a0cfdc6 commit 769d92c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/chipidea/ci_hdrc_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ static int ci_hdrc_imx_remove(struct platform_device *pdev)
if (data->reg_vbus)
regulator_disable(data->reg_vbus);

if (data->phy) {
if (data->phy)
usb_phy_shutdown(data->phy);
module_put(data->phy->dev->driver->owner);
}

clk_disable_unprepare(data->clk);

Expand Down

0 comments on commit 769d92c

Please sign in to comment.