mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring()
[ Upstream commit 16ff7bf6db ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
35614acc10
commit
5af2eb2ffa
@@ -90,7 +90,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user