From 3df9f21af9d52fd4fd85e874ebba5e9cc4905e7d Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 18 Jul 2014 14:28:11 -0700 Subject: [PATCH] staging: comedi: drivers.c: checkpatch.pl --strict cleanup 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 9bfd05b361ea..6ec4a4176e73 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -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) { -- 2.30.2