[PATCH 11/11] staging: dgap: Fix various previously missed checkpatch errors

Mark Hounschell markh at compro.net
Fri Feb 28 20:49:09 UTC 2014


This patch fixes various small checkpatch errors 
I missed in patches 01-10.

Signed-off-by: Mark Hounschell <markh at compro.net>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/dgap/dgap.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 533a9e4..e1dc894 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -260,7 +260,7 @@ static uint dgap_driver_start = FALSE;
 static struct class *dgap_class;
 
 static struct board_t *dgap_BoardsByMajor[256];
-static uchar *dgap_TmpWriteBuf = NULL;
+static uchar *dgap_TmpWriteBuf;
 DECLARE_MUTEX(dgap_TmpWriteSem);
 static uint dgap_count = 500;
 
@@ -733,12 +733,8 @@ static void dgap_cleanup_board(struct board_t *brd)
 	}
 
 	/* Free all allocated channels structs */
-	for (i = 0; i < MAXPORTS ; i++) {
-		if (brd->channels[i]) {
-			kfree(brd->channels[i]);
-			brd->channels[i] = NULL;
-		}
-	}
+	for (i = 0; i < MAXPORTS ; i++)
+		kfree(brd->channels[i]);
 
 	kfree(brd->flipbuf);
 	kfree(brd->flipflagbuf);
@@ -761,7 +757,7 @@ static int dgap_found_board(struct pci_dev *pdev, int id)
 
 	/* get the board structure and prep it */
 	brd = dgap_Board[dgap_NumBoards] =
-	(struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
+		kzalloc(sizeof(struct board_t), GFP_KERNEL);
 	if (!brd)
 		return -ENOMEM;
 
@@ -7415,7 +7411,7 @@ static int	dgap_parsefile(char **in, int Remove)
  * the group, and returns that position.  If the first character is a ^, then
  * this will match the first occurrence not in that group.
  */
-static char *dgap_sindex (char *string, char *group)
+static char *dgap_sindex(char *string, char *group)
 {
 	char    *ptr;
 
@@ -7462,7 +7458,7 @@ static int dgap_gettok(char **in, struct cnode *p)
 		dgap_err("board !!type not specified");
 		return 1;
 	} else {
-		while ( (w = dgap_getword(in)) != NULL ) {
+		while ((w = dgap_getword(in)) != NULL) {
 			snprintf(dgap_cword, MAXCWORD, "%s", w);
 			for (t = dgap_tlist; t->token != 0; t++) {
 				if (!strcmp(w, t->string))
-- 
1.8.1.4



More information about the devel mailing list