Skip to content

Commit

Permalink
[media] mn88473: One function call less in mn88473_init() after error
Browse files Browse the repository at this point in the history
The release_firmware() function was called by the mn88473_init() function even
if a previous function call "request_firmware" failed.
This implementation detail could be improved by the introduction of another
jump label.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
elfring authored and mchehab committed Dec 4, 2014
1 parent b591138 commit 7194782
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/media/mn88473/mn88473.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static int mn88473_init(struct dvb_frontend *fe)
ret = request_firmware(&fw, fw_file, &client->dev);
if (ret) {
dev_err(&client->dev, "firmare file '%s' not found\n", fw_file);
goto err;
goto err_request_firmware;
}

dev_info(&client->dev, "downloading firmware from file '%s'\n",
Expand Down Expand Up @@ -261,9 +261,10 @@ static int mn88473_init(struct dvb_frontend *fe)
dev->warm = true;

return 0;

err:
release_firmware(fw);

err_request_firmware:
dev_dbg(&client->dev, "failed=%d\n", ret);
return ret;
}
Expand Down

0 comments on commit 7194782

Please sign in to comment.