]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: comedi: drivers.c: checkpatch.pl --strict cleanup
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 18 Jul 2014 21:28:11 +0000 (14:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jul 2014 23:10:39 +0000 (16:10 -0700)
Fix the checkpatch.pl --strict issues:

CHECK: DEFINE_MUTEX definition without comment
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers.c

index 9bfd05b361ea801d83f1b241f5f2eaf2f22fa756..6ec4a4176e73c781b6af3d185098b61d24a9d84c 100644 (file)
@@ -38,6 +38,7 @@
 #include "comedi_internal.h"
 
 struct comedi_driver *comedi_drivers;
+/* protects access to comedi_drivers */
 DEFINE_MUTEX(comedi_drivers_list_lock);
 
 int comedi_set_hw_dev(struct comedi_device *dev, struct device *hw_dev)
@@ -566,8 +567,9 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                        dev->board_ptr = comedi_recognize(driv, it->board_name);
                        if (dev->board_ptr)
                                break;
-               } else if (strcmp(driv->driver_name, it->board_name) == 0)
+               } else if (strcmp(driv->driver_name, it->board_name) == 0) {
                        break;
+               }
                module_put(driv->module);
        }
        if (driv == NULL) {