summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKinka Huang2014-07-15 17:11:02 +0200
committerGreg Kroah-Hartman2014-07-16 04:59:16 +0200
commitcb3aadaec89109edb60d4829ce82e50b27cb4ce6 (patch)
treee5c19050f6b24be96f30fe1eca3bf4a1cfec192a /drivers
parentstaging: vt6656: usbpipe irrelevant function descriptions (diff)
downloadkernel-qcow2-linux-cb3aadaec89109edb60d4829ce82e50b27cb4ce6.tar.gz
kernel-qcow2-linux-cb3aadaec89109edb60d4829ce82e50b27cb4ce6.tar.xz
kernel-qcow2-linux-cb3aadaec89109edb60d4829ce82e50b27cb4ce6.zip
staging: comedi: removing not useful `else` after return
Signed-off-by: Kinka Huang <kinkabrain@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/comedi.h8
-rw-r--r--drivers/staging/comedi/comedi_fops.c9
-rw-r--r--drivers/staging/comedi/comedidev.h4
3 files changed, 10 insertions, 11 deletions
diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index dbaeba7469ac..552a5e2a1077 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -555,16 +555,16 @@ static inline unsigned NI_USUAL_PFI_SELECT(unsigned pfi_channel)
{
if (pfi_channel < 10)
return 0x1 + pfi_channel;
- else
- return 0xb + pfi_channel;
+
+ return 0xb + pfi_channel;
}
static inline unsigned NI_USUAL_RTSI_SELECT(unsigned rtsi_channel)
{
if (rtsi_channel < 7)
return 0xb + rtsi_channel;
- else
- return 0x1b;
+
+ return 0x1b;
}
/* mode bits for NI general-purpose counters, set with
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 038b69a93185..36862965051b 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -206,8 +206,8 @@ struct comedi_device *comedi_dev_get_from_minor(unsigned minor)
{
if (minor < COMEDI_NUM_BOARD_MINORS)
return comedi_dev_get_from_board_minor(minor);
- else
- return comedi_dev_get_from_subdevice_minor(minor);
+
+ return comedi_dev_get_from_subdevice_minor(minor);
}
EXPORT_SYMBOL_GPL(comedi_dev_get_from_minor);
@@ -2625,10 +2625,9 @@ static int __init comedi_init(void)
unregister_chrdev_region(MKDEV(COMEDI_MAJOR, 0),
COMEDI_NUM_MINORS);
return PTR_ERR(dev);
- } else {
- /* comedi_alloc_board_minor() locked the mutex */
- mutex_unlock(&dev->mutex);
}
+ /* comedi_alloc_board_minor() locked the mutex */
+ mutex_unlock(&dev->mutex);
}
return 0;
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 83fd1553ff93..01679458ab63 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -388,8 +388,8 @@ static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd)
{
if (subd->subdev_flags & SDF_LSAMPL)
return sizeof(unsigned int);
- else
- return sizeof(short);
+
+ return sizeof(short);
}
/*