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

[media] si2157: One function call less in si2157_init() after error

The release_firmware() function was called in some cases by the si2157_init()
function during error handling even if the passed variable contained still
a null pointer. This implementation detail could be improved
by the introduction of another jump label.

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
e358c8a6 dc89cfcf

+4 -4
+4 -4
drivers/media/tuners/si2157.c
··· 157 157 dev_err(&s->client->dev, "firmware file '%s' is invalid\n", 158 158 fw_file); 159 159 ret = -EINVAL; 160 - goto err; 160 + goto fw_release_exit; 161 161 } 162 162 163 163 dev_info(&s->client->dev, "downloading firmware from file '%s'\n", ··· 173 173 dev_err(&s->client->dev, 174 174 "firmware download failed=%d\n", 175 175 ret); 176 - goto err; 176 + goto fw_release_exit; 177 177 } 178 178 } 179 179 ··· 195 195 s->active = true; 196 196 return 0; 197 197 198 - err: 198 + fw_release_exit: 199 199 release_firmware(fw); 200 - 200 + err: 201 201 dev_dbg(&s->client->dev, "failed=%d\n", ret); 202 202 return ret; 203 203 }