All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Ding <dinggnu@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>,
	Antti Palosaari <crope@iki.fi>,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	Evgeny Plehov <EvgenyPlehov@ukr.net>,
	Peter Senna Tschudin <peter.senna@gmail.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Cong Ding <dinggnu@gmail.com>
Subject: [PATCH] media: dvb-frontends/stv0900_core.c: remove unnecessary null pointer check
Date: Tue, 15 Jan 2013 21:48:13 +0100	[thread overview]
Message-ID: <1358282897-8530-1-git-send-email-dinggnu@gmail.com> (raw)

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

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 drivers/media/dvb-frontends/stv0900_core.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb-frontends/stv0900_core.c b/drivers/media/dvb-frontends/stv0900_core.c
index 0fb34e1..612b872 100644
--- a/drivers/media/dvb-frontends/stv0900_core.c
+++ b/drivers/media/dvb-frontends/stv0900_core.c
@@ -524,11 +524,8 @@ 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;
+	frontend_ops = &fe->ops;
+	tuner_ops = &frontend_ops->tuner_ops;
 
 	if (tuner_ops->set_frequency) {
 		if ((tuner_ops->set_frequency(fe, frequency)) < 0)
-- 
1.7.10.4


             reply	other threads:[~2013-01-15 20:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 20:48 Cong Ding [this message]
2013-01-15 21:07 ` [PATCH v] media: dvb-frontends: remove unnecessary null pointer check Cong Ding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358282897-8530-1-git-send-email-dinggnu@gmail.com \
    --to=dinggnu@gmail.com \
    --cc=EvgenyPlehov@ukr.net \
    --cc=crope@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=peter.senna@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.