Browse Source

caif: Remove redundant null check before kfree in cfctrl.c

kfree on a null pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sachin Kamat 12 years ago
parent
commit
973b1b9a45
1 changed files with 1 additions and 2 deletions
  1. 1 2
      net/caif/cfctrl.c

+ 1 - 2
net/caif/cfctrl.c

@@ -515,8 +515,7 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt)
 							  client_layer : NULL);
 			}
 
-			if (req != NULL)
-				kfree(req);
+			kfree(req);
 
 			spin_unlock_bh(&cfctrl->info_list_lock);
 		}