Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 034e1ec0 authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab
Browse files

[media] si2168: One function call less in si2168_init() after error detection



GIT_AUTHOR_DATE=1416472767
The release_firmware() function was called in some cases by the
si2168_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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 5ed0cf88
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -455,7 +455,7 @@ static int si2168_init(struct dvb_frontend *fe)
			dev_err(&s->client->dev,
			dev_err(&s->client->dev,
					"firmware file '%s' not found\n",
					"firmware file '%s' not found\n",
					fw_file);
					fw_file);
			goto err;
			goto error_fw_release;
		}
		}
	}
	}


@@ -475,7 +475,7 @@ static int si2168_init(struct dvb_frontend *fe)
			dev_err(&s->client->dev,
			dev_err(&s->client->dev,
					"firmware download failed=%d\n",
					"firmware download failed=%d\n",
					ret);
					ret);
			goto err;
			goto error_fw_release;
		}
		}
	}
	}


@@ -506,9 +506,10 @@ static int si2168_init(struct dvb_frontend *fe)
	s->active = true;
	s->active = true;


	return 0;
	return 0;
err:
	release_firmware(fw);


error_fw_release:
	release_firmware(fw);
err:
	dev_dbg(&s->client->dev, "failed=%d\n", ret);
	dev_dbg(&s->client->dev, "failed=%d\n", ret);
	return ret;
	return ret;
}
}