From c15a7009325b84adac2eb0f3919d9c3ff8d5ed11 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 30 Jul 2015 00:36:32 +0300 Subject: [PATCH] staging: comedi: das16: remove a duplicate condition 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 Reviewed-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index d7cf4b153f7c..056bca9c67d5 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -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; -- 2.34.1