From 4d527a7adbc47bdc357ddab513861e6a7636755e Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 13 Mar 2011 00:29:16 -0500 Subject: [PATCH] staging: winbond: Remove NULL check before kfree This patch was generated by the following semantic patch: // @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // Signed-off-by: Ilia Mirkin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/wb35reg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c index 42ae6101..da595f1 100644 --- a/drivers/staging/winbond/wb35reg.c +++ b/drivers/staging/winbond/wb35reg.c @@ -66,8 +66,7 @@ unsigned char Wb35Reg_BurstWrite(struct hw_data *pHwData, u16 RegisterNo, u32 *p } else { if (urb) usb_free_urb(urb); - if (reg_queue) - kfree(reg_queue); + kfree(reg_queue); return false; } return false; -- 2.7.4