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:
Zhang Lixu 2019-10-16 08:15:59 +08:00 committed by Jiri Kosina
parent 9e4dbc4646
commit 16ff7bf6db

View File

@ -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;
}