Commit cb3aadae authored by Kinka Huang's avatar Kinka Huang Committed by Greg Kroah-Hartman

staging: comedi: removing not useful `else` after return

Signed-off-by: default avatarKinka Huang <kinkabrain@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f24937db
...@@ -555,7 +555,7 @@ static inline unsigned NI_USUAL_PFI_SELECT(unsigned pfi_channel) ...@@ -555,7 +555,7 @@ static inline unsigned NI_USUAL_PFI_SELECT(unsigned pfi_channel)
{ {
if (pfi_channel < 10) if (pfi_channel < 10)
return 0x1 + pfi_channel; return 0x1 + pfi_channel;
else
return 0xb + pfi_channel; return 0xb + pfi_channel;
} }
...@@ -563,7 +563,7 @@ static inline unsigned NI_USUAL_RTSI_SELECT(unsigned rtsi_channel) ...@@ -563,7 +563,7 @@ static inline unsigned NI_USUAL_RTSI_SELECT(unsigned rtsi_channel)
{ {
if (rtsi_channel < 7) if (rtsi_channel < 7)
return 0xb + rtsi_channel; return 0xb + rtsi_channel;
else
return 0x1b; return 0x1b;
} }
......
...@@ -206,7 +206,7 @@ struct comedi_device *comedi_dev_get_from_minor(unsigned minor) ...@@ -206,7 +206,7 @@ struct comedi_device *comedi_dev_get_from_minor(unsigned minor)
{ {
if (minor < COMEDI_NUM_BOARD_MINORS) if (minor < COMEDI_NUM_BOARD_MINORS)
return comedi_dev_get_from_board_minor(minor); 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); EXPORT_SYMBOL_GPL(comedi_dev_get_from_minor);
...@@ -2625,11 +2625,10 @@ static int __init comedi_init(void) ...@@ -2625,11 +2625,10 @@ static int __init comedi_init(void)
unregister_chrdev_region(MKDEV(COMEDI_MAJOR, 0), unregister_chrdev_region(MKDEV(COMEDI_MAJOR, 0),
COMEDI_NUM_MINORS); COMEDI_NUM_MINORS);
return PTR_ERR(dev); return PTR_ERR(dev);
} else { }
/* comedi_alloc_board_minor() locked the mutex */ /* comedi_alloc_board_minor() locked the mutex */
mutex_unlock(&dev->mutex); mutex_unlock(&dev->mutex);
} }
}
return 0; return 0;
} }
......
...@@ -388,7 +388,7 @@ static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd) ...@@ -388,7 +388,7 @@ static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd)
{ {
if (subd->subdev_flags & SDF_LSAMPL) if (subd->subdev_flags & SDF_LSAMPL)
return sizeof(unsigned int); return sizeof(unsigned int);
else
return sizeof(short); return sizeof(short);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment