Skip to content

Commit

Permalink
HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring()
Browse files Browse the repository at this point in the history
When allocating tx ring buffers failed, should free tx buffers, not rx buffers.

Signed-off-by: Zhang Lixu <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
lixuzha authored and Jiri Kosina committed Oct 16, 2019
1 parent 9e4dbc4 commit 16ff7bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/intel-ish-hid/ishtp/client-buffers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 16ff7bf

Please sign in to comment.