[1/4] media: cxd2820r: don't check retval after our own assignemt
diff mbox series

Message ID 20190613155421.16408-2-wsa+renesas@sang-engineering.com
State New
Headers show
Series
  • media: don't check retval after our own assignment
Related show

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/cxd2820r_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

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


In the title/subject:

media: cxd2820r: don't check retval after our own assignemt

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.

Hrm... Good spots!

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/media/dvb-frontends/cxd2820r_core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c
> index 1f006f8e8cc2..99a186ddddb2 100644
> --- a/drivers/media/dvb-frontends/cxd2820r_core.c
> +++ b/drivers/media/dvb-frontends/cxd2820r_core.c
> @@ -636,8 +636,7 @@ static int cxd2820r_probe(struct i2c_client *client,
>  	if (!priv->client[1]) {
>  		ret = -ENODEV;
>  		dev_err(&client->dev, "I2C registration failed\n");
> -		if (ret)

Can't argue with that.

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

> -			goto err_regmap_0_regmap_exit;
> +		goto err_regmap_0_regmap_exit;
>  	}
>  
>  	priv->regmap[1] = regmap_init_i2c(priv->client[1], &regmap_config1);
>
Wolfram Sang June 13, 2019, 4:19 p.m. UTC | #2
> In the title/subject:
> 
> media: cxd2820r: don't check retval after our own assignemt
> 
> s/assignemt/assignment/

Eeeks, in deed :( Shall I resend? Sorry for the noise.
Kieran Bingham June 13, 2019, 4:35 p.m. UTC | #3
Hi Wolfram,

On 13/06/2019 17:19, Wolfram Sang wrote:
> 
>> In the title/subject:
>>
>> media: cxd2820r: don't check retval after our own assignemt
>>
>> s/assignemt/assignment/
> 
> Eeeks, in deed :( Shall I resend? Sorry for the noise.
> 

Not necessary for me, so I guess that's up to Mauro/Hans.
Not sure who will pick these up and apply them.
--
Kieran

Patch
diff mbox series

diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c
index 1f006f8e8cc2..99a186ddddb2 100644
--- a/drivers/media/dvb-frontends/cxd2820r_core.c
+++ b/drivers/media/dvb-frontends/cxd2820r_core.c
@@ -636,8 +636,7 @@  static int cxd2820r_probe(struct i2c_client *client,
 	if (!priv->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;
 	}
 
 	priv->regmap[1] = regmap_init_i2c(priv->client[1], &regmap_config1);