Commit 9bc2dd7e authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[media] DVB-frontends: Deletion of unnecessary checks before the function call "release_firmware"

GIT_AUTHOR_DATE=1416472432
The release_firmware() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent d442b15f
...@@ -12255,8 +12255,7 @@ static void drx39xxj_release(struct dvb_frontend *fe) ...@@ -12255,8 +12255,7 @@ static void drx39xxj_release(struct dvb_frontend *fe)
kfree(demod->my_ext_attr); kfree(demod->my_ext_attr);
kfree(demod->my_common_attr); kfree(demod->my_common_attr);
kfree(demod->my_i2c_dev_addr); kfree(demod->my_i2c_dev_addr);
if (demod->firmware) release_firmware(demod->firmware);
release_firmware(demod->firmware);
kfree(demod); kfree(demod);
kfree(state); kfree(state);
} }
......
...@@ -6310,8 +6310,7 @@ static void drxk_release(struct dvb_frontend *fe) ...@@ -6310,8 +6310,7 @@ static void drxk_release(struct dvb_frontend *fe)
struct drxk_state *state = fe->demodulator_priv; struct drxk_state *state = fe->demodulator_priv;
dprintk(1, "\n"); dprintk(1, "\n");
if (state->fw) release_firmware(state->fw);
release_firmware(state->fw);
kfree(state); kfree(state);
} }
......
...@@ -687,8 +687,7 @@ static int m88ds3103_init(struct dvb_frontend *fe) ...@@ -687,8 +687,7 @@ static int m88ds3103_init(struct dvb_frontend *fe)
return 0; return 0;
err: err:
if (fw) release_firmware(fw);
release_firmware(fw);
dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret);
return ret; return ret;
......
...@@ -507,8 +507,7 @@ static int si2168_init(struct dvb_frontend *fe) ...@@ -507,8 +507,7 @@ static int si2168_init(struct dvb_frontend *fe)
return 0; return 0;
err: err:
if (fw) release_firmware(fw);
release_firmware(fw);
dev_dbg(&s->client->dev, "failed=%d\n", ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment