• Sergey Shtylyov's avatar
    i2c: highlander: add IRQ check · f16a3bb6
    Sergey Shtylyov authored
    The driver is written as if platform_get_irq() returns 0 on errors (while
    actually it returns a negative error code), blithely passing these error
    codes to request_irq() (which takes *unsigned* IRQ #) -- which fails with
    -EINVAL. Add the necessary error check to the pre-existing *if* statement
    forcing the driver into the polling mode...
    
    Fixes: 4ad48e6a ("i2c: Renesas Highlander FPGA SMBus support")
    Signed-off-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
    f16a3bb6
i2c-highlander.c 10.6 KB