This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
result = TRUE;
out:
- if (pBuffer)
- kfree(pBuffer);
+ kfree(pBuffer);
spin_lock_irq(&pDevice->lock);
return result;
}
out:
- if (param != NULL)
- kfree(param);
+ kfree(param);
return ret;
}
usb_kill_urb(pTxContext->pUrb);
usb_free_urb(pTxContext->pUrb);
}
- if (pTxContext)
- kfree(pTxContext);
+ kfree(pTxContext);
}
return;
}
if (pRCB->skb)
dev_kfree_skb(pRCB->skb);
}
- if (pDevice->pRCBMem)
- kfree(pDevice->pRCBMem);
+ kfree(pDevice->pRCBMem);
return;
}
static void device_free_int_bufs(PSDevice pDevice)
{
- if (pDevice->intBuf.pDataBuf != NULL)
- kfree(pDevice->intBuf.pDataBuf);
+ kfree(pDevice->intBuf.pDataBuf);
return;
}
*/
if(result!=0) {
- if(buffer)
- kfree(buffer);
+ kfree(buffer);
buffer=NULL;
}
return buffer;
}
out:
- if (param != NULL)
- kfree(param);
+ kfree(param);
return ret;
}