提交 5d354dc3 编写于 作者: U Uwe Kleine-König 提交者: Michael Ellerman

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: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211021105657.72572-1-u.kleine-koenig@pengutronix.de
上级 44c14509
...@@ -135,11 +135,10 @@ static int mcu_gpiochip_add(struct mcu *mcu) ...@@ -135,11 +135,10 @@ static int mcu_gpiochip_add(struct mcu *mcu)
return gpiochip_add_data(gc, 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); kfree(mcu->gc.label);
gpiochip_remove(&mcu->gc); gpiochip_remove(&mcu->gc);
return 0;
} }
static int mcu_probe(struct i2c_client *client) static int mcu_probe(struct i2c_client *client)
...@@ -198,9 +197,7 @@ static int mcu_remove(struct i2c_client *client) ...@@ -198,9 +197,7 @@ static int mcu_remove(struct i2c_client *client)
glob_mcu = NULL; glob_mcu = NULL;
} }
ret = mcu_gpiochip_remove(mcu); mcu_gpiochip_remove(mcu);
if (ret)
return ret;
kfree(mcu); kfree(mcu);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册