@@ -24,25 +24,15 @@ struct mtk_data {
static int mtk_set_active(struct gnss_serial *gserial)
{
struct mtk_data *data = gnss_serial_get_drvdata(gserial);
- int ret;
- ret = regulator_enable(data->vcc);
- if (ret)
- return ret;
-
- return 0;
+ return regulator_enable(data->vcc);
}
static int mtk_set_standby(struct gnss_serial *gserial)
{
struct mtk_data *data = gnss_serial_get_drvdata(gserial);
- int ret;
- ret = regulator_disable(data->vcc);
- if (ret)
- return ret;
-
- return 0;
+ return regulator_disable(data->vcc);
}
static int mtk_set_power(struct gnss_serial *gserial,
Simply return directly instead of assign the return value. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> --- drivers/gnss/mtk.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)