Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] tuners: remove uneeded checks before release_firmware()

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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Markus Elfring and committed by
Mauro Carvalho Chehab
dc89cfcf 99d2fae9

+2 -4
+1 -2
drivers/media/tuners/si2157.c
··· 196 196 return 0; 197 197 198 198 err: 199 - if (fw) 200 - release_firmware(fw); 199 + release_firmware(fw); 201 200 202 201 dev_dbg(&s->client->dev, "failed=%d\n", ret); 203 202 return ret;
+1 -2
drivers/media/tuners/xc5000.c
··· 1336 1336 1337 1337 if (priv) { 1338 1338 cancel_delayed_work(&priv->timer_sleep); 1339 - if (priv->firmware) 1340 - release_firmware(priv->firmware); 1339 + release_firmware(priv->firmware); 1341 1340 hybrid_tuner_release_state(priv); 1342 1341 } 1343 1342