staging: dgnc: DGNC_VERIFY_BOARD macro in do while block
authorJeremiah Mahler <jmmahler@gmail.com>
Sun, 13 Jul 2014 01:26:39 +0000 (18:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jul 2014 19:08:03 +0000 (12:08 -0700)
Enclose the body of the multi-statement DGNC_VERIFY_BOARD macro inside a
do - while block as per Documentation/CodingStyle.  Fixes 1 error found
by checkpatch.pl.

Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_sysfs.c

index 0f0e8fc..3f321bb 100644 (file)
@@ -150,15 +150,17 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver)
 }
 
 
-#define DGNC_VERIFY_BOARD(p, bd)                       \
-       if (!p)                                         \
-               return 0;                               \
-                                                       \
-       bd = dev_get_drvdata(p);                        \
-       if (!bd || bd->magic != DGNC_BOARD_MAGIC)       \
-               return 0;                               \
-       if (bd->state != BOARD_READY)                   \
-               return 0;                               \
+#define DGNC_VERIFY_BOARD(p, bd)                               \
+       do {                                                    \
+               if (!p)                                         \
+                       return 0;                               \
+                                                               \
+               bd = dev_get_drvdata(p);                        \
+               if (!bd || bd->magic != DGNC_BOARD_MAGIC)       \
+                       return 0;                               \
+               if (bd->state != BOARD_READY)                   \
+                       return 0;                               \
+       } while (0)