Re: [PATCH resent 3/4] otg: Fix bug on remove path without transceiver

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

 



On Tuesday 21 April 2009, Robert Jarzmik wrote:
> In the case where a gadget driver is removed while no
> transceiver was found at probe time, a bug in
> otg_put_transceiver() will trigger.
> 
> Provide symetric calls for otg_get_transceiver() and
> otg_put_transceiver(), wherever a transceiver was found or
> not.
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>

Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

... Greg, please merge in the 2.6.30-rc series.

> ---
>  drivers/usb/otg/otg.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
> index ff318fa..0a43a7d 100644
> --- a/drivers/usb/otg/otg.c
> +++ b/drivers/usb/otg/otg.c
> @@ -43,7 +43,8 @@ EXPORT_SYMBOL(otg_get_transceiver);
>   */
>  void otg_put_transceiver(struct otg_transceiver *x)
>  {
> -	put_device(x->dev);
> +	if (x)
> +		put_device(x->dev);
>  }
>  EXPORT_SYMBOL(otg_put_transceiver);
>  
> -- 
> 1.6.2.1
> 
> 


--
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