diff mbox series

[2/4] media: mn88472: don't check retval after our own assignemt

Message ID 20190613155421.16408-3-wsa+renesas@sang-engineering.com (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series media: don't check retval after our own assignment | expand

Commit Message

Wolfram Sang June 13, 2019, 3:54 p.m. UTC
No need to check a retval after we assigned a constant to it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/media/dvb-frontends/mn88472.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Kieran Bingham June 13, 2019, 4:11 p.m. UTC | #1
Hi Wolfram,

Same comment in title (on all 4 patches in fact)
	s/assignemt/assignment/


On 13/06/2019 16:54, Wolfram Sang wrote:
> No need to check a retval after we assigned a constant to it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/media/dvb-frontends/mn88472.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/dvb-frontends/mn88472.c b/drivers/media/dvb-frontends/mn88472.c
> index 731b44b9b74c..0a4d0d5fb4b6 100644
> --- a/drivers/media/dvb-frontends/mn88472.c
> +++ b/drivers/media/dvb-frontends/mn88472.c
> @@ -616,8 +616,7 @@ static int mn88472_probe(struct i2c_client *client,
>  	if (!dev->client[1]) {
>  		ret = -ENODEV;
>  		dev_err(&client->dev, "I2C registration failed\n");
> -		if (ret)
> -			goto err_regmap_0_regmap_exit;
> +		goto err_regmap_0_regmap_exit;

Ack

>  	}
>  	dev->regmap[1] = regmap_init_i2c(dev->client[1], &regmap_config);
>  	if (IS_ERR(dev->regmap[1])) {
> @@ -630,8 +629,7 @@ static int mn88472_probe(struct i2c_client *client,
>  	if (!dev->client[2]) {
>  		ret = -ENODEV;
>  		dev_err(&client->dev, "2nd I2C registration failed\n");
> -		if (ret)
> -			goto err_regmap_1_regmap_exit;
> +		goto err_regmap_1_regmap_exit;

Ack.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

>  	}
>  	dev->regmap[2] = regmap_init_i2c(dev->client[2], &regmap_config);
>  	if (IS_ERR(dev->regmap[2])) {
>
diff mbox series

Patch

diff --git a/drivers/media/dvb-frontends/mn88472.c b/drivers/media/dvb-frontends/mn88472.c
index 731b44b9b74c..0a4d0d5fb4b6 100644
--- a/drivers/media/dvb-frontends/mn88472.c
+++ b/drivers/media/dvb-frontends/mn88472.c
@@ -616,8 +616,7 @@  static int mn88472_probe(struct i2c_client *client,
 	if (!dev->client[1]) {
 		ret = -ENODEV;
 		dev_err(&client->dev, "I2C registration failed\n");
-		if (ret)
-			goto err_regmap_0_regmap_exit;
+		goto err_regmap_0_regmap_exit;
 	}
 	dev->regmap[1] = regmap_init_i2c(dev->client[1], &regmap_config);
 	if (IS_ERR(dev->regmap[1])) {
@@ -630,8 +629,7 @@  static int mn88472_probe(struct i2c_client *client,
 	if (!dev->client[2]) {
 		ret = -ENODEV;
 		dev_err(&client->dev, "2nd I2C registration failed\n");
-		if (ret)
-			goto err_regmap_1_regmap_exit;
+		goto err_regmap_1_regmap_exit;
 	}
 	dev->regmap[2] = regmap_init_i2c(dev->client[2], &regmap_config);
 	if (IS_ERR(dev->regmap[2])) {