]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: das16: remove a duplicate condition
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 29 Jul 2015 21:36:32 +0000 (00:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Jul 2015 23:21:36 +0000 (16:21 -0700)
We checked that "it->options[3]" was non-zero on the line before so
there is no need to check again.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das16.c

index d7cf4b153f7c37889efd8032712ee64a33f27426..056bca9c67d5d637885073a3b635e625c1f392dd 100644 (file)
@@ -1032,8 +1032,7 @@ static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        /*  check that clock setting is valid */
        if (it->options[3]) {
-               if (it->options[3] != 0 &&
-                   it->options[3] != 1 && it->options[3] != 10) {
+               if (it->options[3] != 1 && it->options[3] != 10) {
                        dev_err(dev->class_dev,
                                "Invalid option. Master clock must be set to 1 or 10 (MHz)\n");
                        return -EINVAL;