]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: stm32f7: fix the get_irq error cases
authorFabrice Gasnier <fabrice.gasnier@st.com>
Mon, 17 Jun 2019 07:53:01 +0000 (09:53 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 21 Jun 2019 21:13:25 +0000 (23:13 +0200)
commit40bf82da0ae9ba1d1103dc9a0970a100a03fb6f6
tree6fdd7fbc1fa5b1d4b75b66aa6f2011db578d6395
parent0470d924653d211fb61e9acc0fd22fee070b31e5
i2c: stm32f7: fix the get_irq error cases

During probe, return the "get_irq" error value instead of -EINVAL which
allows the driver to be deferred probed if needed.
Fix also the case where of_irq_get() returns a negative value.
Note :
On failure of_irq_get() returns 0 or a negative value while
platform_get_irq() returns a negative value.

Fixes: 21bf57cb8ec0 ("i2c: i2c-stm32f7: add driver")
Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-stm32f7.c