Don't hardocde EIO but use the obtained value.
Signed-off-by: Wolfram Sang <[email protected]>
---
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
> Von: Wolfram Sang <[email protected]>
> Gesendet: Dienstag, 25. Mai 2021 15:43
> An: [email protected]
> Cc: Support Opensource <[email protected]>; Lee Jones
> <[email protected]>; Jonas Mark (BT-FIR/ENG1-Grb)
> <[email protected]>; Streidl Hubert (BT-FIR/ENG1-Grb)
> <[email protected]>; [email protected]; Wolfram
> Sang <[email protected]>
> Betreff: [PATCH] mfd: da9063: propagate errno when I2C mode fails
>
> Don't hardocde EIO but use the obtained value.
>
> Signed-off-by: Wolfram Sang <[email protected]>
> ---
> 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 <[email protected]>
On Tue, 25 May 2021, Wolfram Sang wrote:
> Don't hardocde EIO but use the obtained value.
>
> Signed-off-by: Wolfram Sang <[email protected]>
> ---
> drivers/mfd/da9063-i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog