mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 15:41:36 +00:00
HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring()
When allocating tx ring buffers failed, should free tx buffers, not rx buffers. Signed-off-by: Zhang Lixu <lixu.zhang@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
9e4dbc4646
commit
16ff7bf6db
@ -84,7 +84,7 @@ int ishtp_cl_alloc_tx_ring(struct ishtp_cl *cl)
|
||||
return 0;
|
||||
out:
|
||||
dev_err(&cl->device->dev, "error in allocating Tx pool\n");
|
||||
ishtp_cl_free_rx_ring(cl);
|
||||
ishtp_cl_free_tx_ring(cl);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user