提交 78dab40a 编写于 作者: A Antti Palosaari 提交者: Mauro Carvalho Chehab

[media] si2157: change firmware download error handling

Rename firmare download error path goto label. Remove firmware NULL
set as NULL value is not needed anymore, due to recent change which
started using goto labels for firmware error handling.

Cc: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: NAntti Palosaari <crope@iki.fi>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 8fe51725
...@@ -81,7 +81,7 @@ static int si2157_init(struct dvb_frontend *fe) ...@@ -81,7 +81,7 @@ static int si2157_init(struct dvb_frontend *fe)
struct si2157_dev *dev = i2c_get_clientdata(client); struct si2157_dev *dev = i2c_get_clientdata(client);
int ret, len, remaining; int ret, len, remaining;
struct si2157_cmd cmd; struct si2157_cmd cmd;
const struct firmware *fw = NULL; const struct firmware *fw;
u8 *fw_file; u8 *fw_file;
unsigned int chip_id; unsigned int chip_id;
...@@ -154,7 +154,7 @@ static int si2157_init(struct dvb_frontend *fe) ...@@ -154,7 +154,7 @@ static int si2157_init(struct dvb_frontend *fe)
dev_err(&client->dev, "firmware file '%s' is invalid\n", dev_err(&client->dev, "firmware file '%s' is invalid\n",
fw_file); fw_file);
ret = -EINVAL; ret = -EINVAL;
goto fw_release_exit; goto err_release_firmware;
} }
dev_info(&client->dev, "downloading firmware from file '%s'\n", dev_info(&client->dev, "downloading firmware from file '%s'\n",
...@@ -169,12 +169,11 @@ static int si2157_init(struct dvb_frontend *fe) ...@@ -169,12 +169,11 @@ static int si2157_init(struct dvb_frontend *fe)
if (ret) { if (ret) {
dev_err(&client->dev, "firmware download failed %d\n", dev_err(&client->dev, "firmware download failed %d\n",
ret); ret);
goto fw_release_exit; goto err_release_firmware;
} }
} }
release_firmware(fw); release_firmware(fw);
fw = NULL;
skip_fw_download: skip_fw_download:
/* reboot the tuner with new firmware? */ /* reboot the tuner with new firmware? */
...@@ -191,7 +190,7 @@ static int si2157_init(struct dvb_frontend *fe) ...@@ -191,7 +190,7 @@ static int si2157_init(struct dvb_frontend *fe)
dev->active = true; dev->active = true;
return 0; return 0;
fw_release_exit: err_release_firmware:
release_firmware(fw); release_firmware(fw);
err: err:
dev_dbg(&client->dev, "failed=%d\n", ret); dev_dbg(&client->dev, "failed=%d\n", ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册