Re: [PATCH 2/4] usb: chipidea: ci_hdrc_imx: remove an unsolicited module_put() call from ci_hdrc_imx_remove()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 31, 2013 at 04:21:14PM +0200, Lothar Waßmann wrote:
> 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@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/ci_hdrc_imx.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
> index 14362c0..802eab1 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -218,10 +218,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);

Have you met warning? devm_usb_get_phy_by_phandle at probe calls
try_module_get.

-- 

Best Regards,
Peter Chen

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux