Re: [PATCH] pinctrl: sirf: atlas7: fix of_irq_get() error check

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

 



On Mon, Aug 7, 2017 at 11:53 AM, Sergei Shtylyov
<sergei.shtylyov@xxxxxxxxxxxxxxxxxx> wrote:
> On 8/7/2017 12:07 PM, Linus Walleij wrote:
>
>>>>> of_irq_get() may return  any negative error number as well as 0 on
>>>>> failure,
>>>>> while the driver only checks for -EPROBE_DEFER, blithely continuing
>>>>> with
>>>>> the call to gpiochip_set_chained_irqchip() -- that function expects the
>>>>> parent IRQ as *unsigned int*, so would probably do nothing  when a
>>>>> large
>>>>> IRQ number resulting from a conversion of a negative error number is
>>>>> passed
>>>>> to it, however passing 0 would probably work but the driver won't
>>>>> receive
>>>>> valid GPIO bank interrupts.
>>>>>
>>>>> Check for 'ret <= 0' instead and return -ENXIO from the driver's probe
>>>>> iff
>>>>> of_irq_get() returned 0.
>>>>>
>>>>> Fixes: f9367793293d ("pinctrl: sirf: add sirf atlas7 pinctrl and gpio
>>>>> support")
>>>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>
>>>>
>>>>
>>>>
>>>> Patch applied!
>>>
>>>
>>>
>>>    Thanks! But to which branch? I'm not seeing it in linux-pinctrl.git...
>>
>>
>> devel.
>
>
>    Still not seeing the patch, perhaps you forgot to push?

Nah just haven't had time to push yet...

My mailbox is filling up with new patches at the same pace that I
apply them it seems.

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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux