lkml.org 
[lkml]   [2020]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Input: ep93xx_keypad: Checking for a failed platform_get_irq()call in ep93xx_keypad_probe()
From
Date
Hi Dmitry:

On 2020/4/10 4:48, Dmitry Torokhov wrote:
> Platform code historically allowed creating IRQ resources with IRQ
> number 0 to indicate "no interrupt assigned", so this driver tries to
> filter out such conditions. The negative IRQs (errors) will be rejected
> by request_irq() but I guess we can lose -EPROBE_DEFER. We could do
>
> if (keypad->irq <= 0) {
> err = keypad->irq ?: -ENXIO : keypad->irq;
> goto failed_free;
> }

I have been aware of this problem for several days, and by doing
experiments on the hardware, I have found the following ways that maybe
suitable:

    if (keypad->irq <= 0) {
        err = keypad->irq ? : -ENXIO;
        goto failed_free;
    }
    or
    if (keypad->irq <= 0) {
        err = keypad->irq < 0 ? keypad->irq : -ENXIO;
        goto failed_free;
    }

If you think it's usefull, I will send this patch to fix this problem.

Thanks

Tang Bin



\
 
 \ /
  Last update: 2020-04-10 04:55    [W:0.062 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site