[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56AF514D.6010608@cogentembedded.com>
Date: Mon, 1 Feb 2016 15:36:29 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Robert Jarzmik <robert.jarzmik@...e.fr>,
Nicolas Pitre <nico@...xnic.net>,
"David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: smc91x: propagate irq return code
Hello.
On 2/1/2016 1:46 AM, Robert Jarzmik wrote:
> The smc91x driver doesn't honor the probe deferral mechanism when the
> interrupt source is not yet available, such as one provided by a gpio
> controller not probed.
>
> Fix this by propagating the platform_get_irq() error code as the probe
> return value.
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@...e.fr>
> ---
> drivers/net/ethernet/smsc/smc91x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
> index 0e2fc1a844ab..43ab7aa31a79 100644
> --- a/drivers/net/ethernet/smsc/smc91x.c
> +++ b/drivers/net/ethernet/smsc/smc91x.c
> @@ -2343,7 +2343,7 @@ static int smc_drv_probe(struct platform_device *pdev)
>
> ndev->irq = platform_get_irq(pdev, 0);
> if (ndev->irq <= 0) {
> - ret = -ENODEV;
> + ret = ndev->irq;
What if 'ndev->irq' does equal 0?
MBR, Sergei
Powered by blists - more mailing lists