AW: [PATCH] mfd: da9063: propagate errno when I2C mode fails

From: Jonas Mark (BT-FIR/ENG1-Grb)
Date: Tue May 25 2021 - 10:03:54 EST


> Von: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Gesendet: Dienstag, 25. Mai 2021 15:43
> An: linux-kernel@xxxxxxxxxxxxxxx
> Cc: Support Opensource <support.opensource@xxxxxxxxxxx>; Lee Jones
> <lee.jones@xxxxxxxxxx>; Jonas Mark (BT-FIR/ENG1-Grb)
> <Mark.Jonas@xxxxxxxxxxxx>; Streidl Hubert (BT-FIR/ENG1-Grb)
> <Hubert.Streidl@xxxxxxxxxxxx>; stwiss.opensource@xxxxxxxxxxx; Wolfram
> Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Betreff: [PATCH] mfd: da9063: propagate errno when I2C mode fails
>
> Don't hardocde EIO but use the obtained value.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/mfd/da9063-i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/da9063-i2c.c b/drivers/mfd/da9063-i2c.c index
> 783a14af18e2..4b7f707b7952 100644
> --- a/drivers/mfd/da9063-i2c.c
> +++ b/drivers/mfd/da9063-i2c.c
> @@ -448,7 +448,7 @@ static int da9063_i2c_probe(struct i2c_client *i2c,
> DA9063_TWOWIRE_TO);
> if (ret < 0) {
> dev_err(da9063->dev, "Failed to set Two-Wire Bus
> Mode.\n");
> - return -EIO;
> + return ret;
> }
> }
>
> --
> 2.30.2

Reviewed-by: Mark Jonas <mark.jonas@xxxxxxxxxxxx>