summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Turnbull <phil.turnbull@oracle.com>2016-07-29 09:43:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 17:07:19 +0200
commitc71f20ee76342376e3c4c67cdbe7421d8c4e886e (patch)
treed035847abb1eb9a1a4b766866a0fa4a5b3a63ddd
parent5ca05345c56cb979e1a25ab6146437002f95cac8 (diff)
downloadlinux-c71f20ee76342376e3c4c67cdbe7421d8c4e886e.tar.gz
linux-c71f20ee76342376e3c4c67cdbe7421d8c4e886e.tar.bz2
linux-c71f20ee76342376e3c4c67cdbe7421d8c4e886e.zip
staging: comedi: adv_pci1760: Do not return EINVAL for CMDF_ROUND_DOWN.
The CMDF_ROUND_DOWN case falls through and so always returns -EINVAL. Fixes: 14b93bb6bbf0 ("staging: comedi: adv_pci_dio: separate out PCI-1760 support") Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/adv_pci1760.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci1760.c b/drivers/staging/comedi/drivers/adv_pci1760.c
index d7dd1e55e347..9f525ff7290c 100644
--- a/drivers/staging/comedi/drivers/adv_pci1760.c
+++ b/drivers/staging/comedi/drivers/adv_pci1760.c
@@ -196,6 +196,7 @@ static int pci1760_pwm_ns_to_div(unsigned int flags, unsigned int ns)
break;
case CMDF_ROUND_DOWN:
divisor = ns / PCI1760_PWM_TIMEBASE;
+ break;
default:
return -EINVAL;
}