All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@linuxtv.org>
To: linux-media@vger.kernel.org
Subject: [PATCH 2/2] DVB: dvb_frontend: check function pointers on reinitialize
Date: Wed, 24 Aug 2011 17:33:52 +0000	[thread overview]
Message-ID: <1314207232-6031-2-git-send-email-obi@linuxtv.org> (raw)
In-Reply-To: <1314207232-6031-1-git-send-email-obi@linuxtv.org>

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
---
 drivers/media/dvb/dvb-core/dvb_frontend.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index f433a88..79a3cc3 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -576,12 +576,10 @@ restart:
 
 		if (fepriv->reinitialise) {
 			dvb_frontend_init(fe);
-			if (fepriv->tone != -1) {
+			if (fe->ops.set_tone && fepriv->tone != -1)
 				fe->ops.set_tone(fe, fepriv->tone);
-			}
-			if (fepriv->voltage != -1) {
+			if (fe->ops.set_voltage && fepriv->voltage != -1)
 				fe->ops.set_voltage(fe, fepriv->voltage);
-			}
 			fepriv->reinitialise = 0;
 		}
 
-- 
1.7.2.5


  reply	other threads:[~2011-08-24 17:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24 17:33 [PATCH 1/2] DVB: dvb_frontend: convert semaphore to mutex Andreas Oberritter
2011-08-24 17:33 ` Andreas Oberritter [this message]
2011-08-24 17:54 ` Devin Heitmueller
2011-08-24 18:02   ` Andreas Oberritter
2011-08-24 18:06     ` Devin Heitmueller
2011-08-24 18:08       ` Andreas Oberritter
2011-08-24 18:54         ` Devin Heitmueller
2011-08-26 10:10           ` Andreas Oberritter
2011-09-04 14:00             ` Mauro Carvalho Chehab

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=1314207232-6031-2-git-send-email-obi@linuxtv.org \
    --to=obi@linuxtv.org \
    --cc=linux-media@vger.kernel.org \
    /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.