mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fred Akers <knivey@botops.net>
To: greg@kroah.com, abbotti@mev.co.uk, hsweeten@visionengravers.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Fred Akers <knivey@botops.net>
Subject: [PATCH v2 2/2] Staging: comedi: range: remove unnecessary sanity check
Date: Thu,  6 Mar 2014 01:57:19 -0500	[thread overview]
Message-ID: <1394089039-12408-2-git-send-email-knivey@botops.net> (raw)
In-Reply-To: <20140306062333.GA19862@kroah.com>

This check is unnecessary because range_table will always be
initialized to range_unknown by comedi_device_postconfig() for
drivers that do not initialize range_table or range_table_list

Signed-off-by: Fred Akers <knivey@botops.net>
---
 drivers/staging/comedi/range.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c
index c4bb13b..b684954 100644
--- a/drivers/staging/comedi/range.c
+++ b/drivers/staging/comedi/range.c
@@ -143,10 +143,6 @@ int comedi_check_chanlist(struct comedi_subdevice *s, int n,
 	unsigned int chanspec;
 	int chan, range_len, i;
 
-	if (!s->range_table && !s->range_table_list) {
-		dev_err(dev->class_dev, "(bug) no range type list!\n");
-		return -EINVAL;
-	}
 	for (i = 0; i < n; i++) {
 		chanspec = chanlist[i];
 		chan = CR_CHAN(chanspec);
-- 
1.8.5.3


  parent reply	other threads:[~2014-03-06  6:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53176DC0.9070503@mev.co.uk>
2014-03-06  6:07 ` [PATCH] " Fred Akers
2014-03-06  6:23   ` Greg KH
2014-03-06  6:57     ` [PATCH v2 1/2] Staging: comedi: range: tidy up comedi_check_chanlist() Fred Akers
2014-03-06  9:05       ` Ian Abbott
2014-03-06 16:43       ` Hartley Sweeten
2014-03-06  6:57     ` Fred Akers [this message]
2014-03-06  9:18       ` [PATCH v2 2/2] Staging: comedi: range: remove unnecessary sanity check Ian Abbott
2014-03-06  9:24       ` Dan Carpenter
2014-03-06 16:44       ` Hartley Sweeten

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=1394089039-12408-2-git-send-email-knivey@botops.net \
    --to=knivey@botops.net \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=greg@kroah.com \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®