Re: [PATCH -next] usb: musb: Do not check 0 for platform_get_irq()

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

 



On 8/3/23 6:58 AM, Zhu Wang wrote:

> Since platform_get_irq() never returned zero, so it need not to check
> whether it returned zero, and we use the return error code of
> platform_get_irq() to replace the current return error code.

   You don't say anything about fixing the deferred probing which
this patch mainly does...

> Please refer to the commit a85a6c86c25b ("driver core: platform: Clarify
> that IRQ 0 is invalid") to get that platform_get_irq() never returned
> zero.

   Not true, it only WARNs about IRQ0. Commit ce753ad1549c ("platform:
finally disallow IRQ0 in platform_get_irq() and its ilk") makes sure
IRQ0 is not returned.

> Signed-off-by: Zhu Wang <wangzhu9@xxxxxxxxxx>
> ---
>  drivers/usb/musb/musb_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index ecbd3784bec3..b24adb5b399f 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -2610,8 +2610,8 @@ static int musb_probe(struct platform_device *pdev)
>  	int		irq = platform_get_irq_byname(pdev, "mc");
>  	void __iomem	*base;
>  
> -	if (irq <= 0)
> -		return -ENODEV;
> +	if (irq < 0)
> +		return irq;

   Hm, I thought I've done it long ago, but apparently not... :-(

[...]

   So, the change is OK but the description is not...

MBR, Sergey



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

  Powered by Linux