caif: Remove redundant null check before kfree in cfctrl.c
Sachin Kamat [Tue, 20 Nov 2012 00:53:58 +0000 (00:53 +0000)]
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>

net/caif/cfctrl.c

index 44f270f..a376ec1 100644 (file)
@@ -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);
                }