mfd: stmfx: Fix dev_err_probe() call in stmfx_chip_init()
authorAmelie Delaunay <amelie.delaunay@st.com>
Fri, 13 Nov 2020 12:27:25 +0000 (13:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:16 +0000 (11:53 +0100)
commitde39384806af37564a0fd6aef7557bf61cbde0e1
treef55f67e974bc4ae55804815a6ab73e9fdf6fc070
parentb278cdb100399bbe233d8072d03884c52b7079fa
mfd: stmfx: Fix dev_err_probe() call in stmfx_chip_init()

[ Upstream commit d75846ed08e6f4135ec73778575c34d9c0ace993 ]

'ret' may be 0 so, dev_err_probe() should be called only when 'ret' is
an error code.

Fixes: 41c9c06c491a ("mfd: stmfx: Simplify with dev_err_probe()")
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/stmfx.c