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)
commit79b4499524ed659fb76323efc30f3dc03967c88f
tree6fdd7fbc1fa5b1d4b75b66aa6f2011db578d6395
parentaf668d6518dcf7106bf4eef1641d8143842dc9cc
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: aeb068c57214 ("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