hid: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/hid/intel-ish-hid/ishtp/client-buffers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/intel-ish-hid/ishtp/client-buffers.c +1 -1
@@ -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 ; }
Signature · 1 line
2.17.1
Quoted 13 lines · Zhang Lixu
When allocating tx ring buffers failed, should free tx buffers, not rx buffers.
Signed-off-by Zhang Lixu <[email protected]>--- drivers/hid/intel-ish-hid/ishtp/client-buffers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/intel-ish-hid/ishtp/client-buffers.c +0
-0
drivers/hid/intel-ish-hid/ishtp/client-buffers.c int ishtp_cl_alloc_tx_ring(struct ishtp_cl *cl) · line 87
Quoted 5 lines
drivers/hid/intel-ish-hid/ishtp/client-buffers.c +1
-1@@ -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);
Applied to for-5.4/upstream-fixes, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs