mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
HID: intel_ish-hid: Use kzalloc instead of kmalloc/memset
Use kzalloc rather than kmalloc followed by memset with 0. Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
e8c6113595
commit
6cf5c1c716
1 changed files with 1 additions and 2 deletions
|
|
@ -73,11 +73,10 @@ int ishtp_cl_alloc_tx_ring(struct ishtp_cl *cl)
|
|||
for (j = 0; j < cl->tx_ring_size; ++j) {
|
||||
struct ishtp_cl_tx_ring *tx_buf;
|
||||
|
||||
tx_buf = kmalloc(sizeof(struct ishtp_cl_tx_ring), GFP_KERNEL);
|
||||
tx_buf = kzalloc(sizeof(struct ishtp_cl_tx_ring), GFP_KERNEL);
|
||||
if (!tx_buf)
|
||||
goto out;
|
||||
|
||||
memset(tx_buf, 0, sizeof(struct ishtp_cl_tx_ring));
|
||||
tx_buf->send_buf.data = kmalloc(len, GFP_KERNEL);
|
||||
if (!tx_buf->send_buf.data) {
|
||||
kfree(tx_buf);
|
||||
|
|
|
|||
Loading…
Reference in a new issue