[ Upstream commit b0536f9826a5ed3328d527b4fc1686867a9f3041 ]
If 'ad7780_init_gpios()' fails, we must not release some resources that
have not been allocated yet. Return directly instead.
Fixes: 5bb30e7daf ("staging: iio: ad7780: move regulator to after GPIO init")
Fixes: 9085daa4ab ("staging: iio: ad7780: add gain & filter gpio support")
Signed-off-by: Christophe JAILLET <[email protected]>
Acked-by: Renato Lui Geh <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>