Browse Source

Staging: comedi: ni_labpc_cs: removed null check from kfree

Signed-off-by: Bart Massey <bart@cs.pdx.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bart Massey 16 years ago
parent
commit
92c4bad75c
1 changed files with 2 additions and 3 deletions
  1. 2 3
      drivers/staging/comedi/drivers/ni_labpc_cs.c

+ 2 - 3
drivers/staging/comedi/drivers/ni_labpc_cs.c

@@ -272,9 +272,8 @@ static void labpc_cs_detach(struct pcmcia_device *link)
 		labpc_release(link);
 		labpc_release(link);
 	}
 	}
 
 
-	/* This points to the parent local_info_t struct */
-	if (link->priv)
-		kfree(link->priv);
+	/* This points to the parent local_info_t struct (may be null) */
+	kfree(link->priv);
 
 
 }				/* labpc_cs_detach */
 }				/* labpc_cs_detach */