[PATCH 01/32] staging: comedi: comedi_fops: checkpatch.pl cleanup (else after return)
H Hartley Sweeten
hsweeten at visionengravers.com
Wed Jul 16 17:43:12 UTC 2014
Fix the two checkpatch.pl warnings in this file:
WARNING: else is not generally useful after a break or return
Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregk at linuxfoundation.org>
---
drivers/staging/comedi/comedi_fops.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 038b69a..3686296 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;
--
1.9.3
More information about the devel
mailing list