* [PATCH 2/6] drivers: rtc: abracon: Remove redundant variable
2022-06-29 6:30 [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Alexander Shiyan
@ 2022-06-29 6:30 ` Alexander Shiyan
2022-06-29 6:30 ` [PATCH 3/6] drivers: regulator: fixed: Fix error path in probe Alexander Shiyan
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-29 6:30 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/rtc/rtc-abracon.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-abracon.c b/drivers/rtc/rtc-abracon.c
index 6144fc0aa9..585b95c4a7 100644
--- a/drivers/rtc/rtc-abracon.c
+++ b/drivers/rtc/rtc-abracon.c
@@ -84,7 +84,6 @@ static int abracon_probe(struct device_d *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct abracon *abracon;
- int ret;
abracon = xzalloc(sizeof(*abracon));
@@ -93,9 +92,7 @@ static int abracon_probe(struct device_d *dev)
abracon->rtc.ops = &ds13xx_rtc_ops;
abracon->rtc.dev = dev;
- ret = rtc_register(&abracon->rtc);
-
- return ret;
+ return rtc_register(&abracon->rtc);
};
static struct platform_device_id abracon_id[] = {
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/6] drivers: regulator: fixed: Fix error path in probe
2022-06-29 6:30 [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Alexander Shiyan
2022-06-29 6:30 ` [PATCH 2/6] drivers: rtc: abracon: " Alexander Shiyan
@ 2022-06-29 6:30 ` Alexander Shiyan
2022-06-29 6:30 ` [PATCH 4/6] drivers: pwm: imx: Remove redundant assignment Alexander Shiyan
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-29 6:30 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/regulator/fixed.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index f068fded62..ddcc1bcb97 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -78,10 +78,9 @@ static int regulator_fixed_probe(struct device_d *dev)
}
ret = of_regulator_register(&fix->rdev, dev->device_node);
- if (ret)
- return ret;
+ if (!ret)
+ return 0;
- return 0;
err:
free(fix);
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/6] drivers: pwm: imx: Remove redundant assignment
2022-06-29 6:30 [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Alexander Shiyan
2022-06-29 6:30 ` [PATCH 2/6] drivers: rtc: abracon: " Alexander Shiyan
2022-06-29 6:30 ` [PATCH 3/6] drivers: regulator: fixed: Fix error path in probe Alexander Shiyan
@ 2022-06-29 6:30 ` Alexander Shiyan
2022-06-29 6:30 ` [PATCH 5/6] drivers: gpio: pcf857x: " Alexander Shiyan
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-29 6:30 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/pwm/pwm-imx.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 609765d895..c542b72796 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -206,7 +206,7 @@ static int imx_pwm_probe(struct device_d *dev)
struct resource *iores;
const struct imx_pwm_data *data;
struct imx_chip *imx;
- int ret = 0;
+ int ret;
ret = dev_get_drvdata(dev, (const void **)&data);
if (ret)
@@ -236,11 +236,7 @@ static int imx_pwm_probe(struct device_d *dev)
imx->config = data->config;
imx->set_enable = data->set_enable;
- ret = pwmchip_add(&imx->chip, dev);
- if (ret < 0)
- return ret;
-
- return 0;
+ return pwmchip_add(&imx->chip, dev);;
}
static struct driver_d imx_pwm_driver = {
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/6] drivers: gpio: pcf857x: Remove redundant assignment
2022-06-29 6:30 [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Alexander Shiyan
` (2 preceding siblings ...)
2022-06-29 6:30 ` [PATCH 4/6] drivers: pwm: imx: Remove redundant assignment Alexander Shiyan
@ 2022-06-29 6:30 ` Alexander Shiyan
2022-06-29 6:30 ` [PATCH 6/6] drivers: led: pca955x: " Alexander Shiyan
2022-06-29 7:33 ` [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-29 6:30 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/gpio/gpio-pcf857x.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c
index fefd20de6f..612ef3a82e 100644
--- a/drivers/gpio/gpio-pcf857x.c
+++ b/drivers/gpio/gpio-pcf857x.c
@@ -219,11 +219,7 @@ static int pcf857x_probe(struct device_d *dev)
*/
gpio->out = ~n_latch;
- ret = gpiochip_add(&gpio->chip);
- if (ret)
- return ret;
-
- return ret;
+ return gpiochip_add(&gpio->chip);
}
static const struct of_device_id pcf857x_dt_ids[] = {
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 6/6] drivers: led: pca955x: Remove redundant assignment
2022-06-29 6:30 [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Alexander Shiyan
` (3 preceding siblings ...)
2022-06-29 6:30 ` [PATCH 5/6] drivers: gpio: pcf857x: " Alexander Shiyan
@ 2022-06-29 6:30 ` Alexander Shiyan
2022-06-29 7:33 ` [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-29 6:30 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/led/led-pca955x.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/led/led-pca955x.c b/drivers/led/led-pca955x.c
index 848feb9773..aa518fe738 100644
--- a/drivers/led/led-pca955x.c
+++ b/drivers/led/led-pca955x.c
@@ -387,11 +387,10 @@ static int led_pca955x_probe(struct device_d *dev)
err = pca955x_write_psc(client, 0, 0);
if (err)
return err;
+
err = pca955x_write_psc(client, 1, 0);
- if (err)
- return err;
- return 0;
+ return err;
}
static struct driver_d led_pca955x_driver = {
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable
2022-06-29 6:30 [PATCH 1/6] drivers: rtc: pcf8536: Remove redundant variable Alexander Shiyan
` (4 preceding siblings ...)
2022-06-29 6:30 ` [PATCH 6/6] drivers: led: pca955x: " Alexander Shiyan
@ 2022-06-29 7:33 ` Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2022-06-29 7:33 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Wed, Jun 29, 2022 at 09:30:19AM +0300, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
> drivers/rtc/rtc-pcf85363.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/rtc/rtc-pcf85363.c b/drivers/rtc/rtc-pcf85363.c
> index 7b785d6a77..b9f0fc6012 100644
> --- a/drivers/rtc/rtc-pcf85363.c
> +++ b/drivers/rtc/rtc-pcf85363.c
> @@ -131,7 +131,6 @@ static int pcf85363_probe(struct device_d *dev)
> struct i2c_client *client = to_i2c_client(dev);
> struct pcf85363 *pcf85363;
> struct regmap *regmap;
> - int ret;
>
> regmap = regmap_init_i2c(client,
> &pcf85363_regmap_i2c_config);
> @@ -147,9 +146,7 @@ static int pcf85363_probe(struct device_d *dev)
> pcf85363->rtc.ops = &rtc_ops;
> pcf85363->rtc.dev = dev;
>
> - ret = rtc_register(&pcf85363->rtc);
> -
> - return ret;
> + return rtc_register(&pcf85363->rtc);
> }
>
> static struct platform_device_id dev_ids[] = {
> --
> 2.32.0
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread