Re: [PATCH 2/3] pata_imx: Propagate the real error code on platform_get_irq() failure

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

 



Hello.

On 02/17/2014 10:48 PM, Fabio Estevam wrote:

         irq = platform_get_irq(pdev, 0);
         if (irq <= 0)
-               return -EINVAL;
+               return irq;

    If returned IRQ is 0 (unused), you'll return 0, indicating probe success
while actually it failed. We need somewhat more complicated code here.

Right, then we should do this instead:

          irq = platform_get_irq(pdev, 0);
          if (irq < 0)
                return irq;

Yes, but don't forget that 0 is not considered a valid IRQ either. Ask Linus why. ;-)

Regards,

Fabio Estevam

WBR, Sergei

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




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux