Commit 4880f564 authored by Cong Ding's avatar Cong Ding Committed by Mauro Carvalho Chehab
Browse files

[media] stv0900: remove unnecessary null pointer check



The address of a variable is impossible to be null, so we remove the check.

Signed-off-by: default avatarCong Ding <dinggnu@gmail.com>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a92591a7
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -524,10 +524,7 @@ void stv0900_set_tuner(struct dvb_frontend *fe, u32 frequency,
	struct dvb_frontend_ops *frontend_ops = NULL;
	struct dvb_tuner_ops *tuner_ops = NULL;

	if (&fe->ops)
	frontend_ops = &fe->ops;

	if (&frontend_ops->tuner_ops)
	tuner_ops = &frontend_ops->tuner_ops;

	if (tuner_ops->set_frequency) {
@@ -552,10 +549,7 @@ void stv0900_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth)
	struct dvb_frontend_ops *frontend_ops = NULL;
	struct dvb_tuner_ops *tuner_ops = NULL;

	if (&fe->ops)
	frontend_ops = &fe->ops;

	if (&frontend_ops->tuner_ops)
	tuner_ops = &frontend_ops->tuner_ops;

	if (tuner_ops->set_bandwidth) {
+2 −5
Original line number Diff line number Diff line
@@ -1167,10 +1167,7 @@ static u32 stv0900_get_tuner_freq(struct dvb_frontend *fe)
	struct dvb_tuner_ops *tuner_ops = NULL;
	u32 freq = 0;

	if (&fe->ops)
	frontend_ops = &fe->ops;

	if (&frontend_ops->tuner_ops)
	tuner_ops = &frontend_ops->tuner_ops;

	if (tuner_ops->get_frequency) {