i2c: stm32f7: fix the get_irq error cases
[ Upstream commit 79b4499524ed659fb76323efc30f3dc03967c88f ] 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: aeb068c5 ("i2c: i2c-stm32f7: add driver") Reviewed-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: NFabien Dessenne <fabien.dessenne@st.com> Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Signed-off-by: NSasha Levin <sashal@kernel.org>
Showing
想要评论请 注册 或 登录