summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-10-21 12:56:57 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-10-28 00:41:29 +1100
commit5d354dc35ebb0b224d627264c60f60dbda3a1bc3 (patch)
tree115e31e775f9a5093a27f8c9f3bd3ea978b72a2c /arch/powerpc
parent44c14509b0dabb909ad1ec28800893ea71762732 (diff)
downloadlinux-5d354dc35ebb0b224d627264c60f60dbda3a1bc3.tar.bz2
powerpc/83xx/mpc8349emitx: Make mcu_gpiochip_remove() return void
Up to now mcu_gpiochip_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211021105657.72572-1-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index 409481016928..bb789f33c70e 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -135,11 +135,10 @@ static int mcu_gpiochip_add(struct mcu *mcu)
return gpiochip_add_data(gc, mcu);
}
-static int mcu_gpiochip_remove(struct mcu *mcu)
+static void mcu_gpiochip_remove(struct mcu *mcu)
{
kfree(mcu->gc.label);
gpiochip_remove(&mcu->gc);
- return 0;
}
static int mcu_probe(struct i2c_client *client)
@@ -198,9 +197,7 @@ static int mcu_remove(struct i2c_client *client)
glob_mcu = NULL;
}
- ret = mcu_gpiochip_remove(mcu);
- if (ret)
- return ret;
+ mcu_gpiochip_remove(mcu);
kfree(mcu);
return 0;
}