Skip to content

Commit

Permalink
caif: Remove redundant null check before kfree in cfctrl.c
Browse files Browse the repository at this point in the history
kfree on a null pointer is a no-op.

Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Sjur Brændeland <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Sachin Kamat authored and davem330 committed Nov 20, 2012
1 parent 4babfb9 commit 973b1b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/caif/cfctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 973b1b9

Please sign in to comment.