diff mbox series

[-next] HID: intel-ish-hid: simplify the return expression of ishtp_hid_parse

Message ID 20200921082434.2591357-1-liushixin2@huawei.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show
Series [-next] HID: intel-ish-hid: simplify the return expression of ishtp_hid_parse | expand

Commit Message

Liu Shixin Sept. 21, 2020, 8:24 a.m. UTC
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/hid/intel-ish-hid/ishtp-hid.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c
index b8aae69ad15d..edf5ae942508 100644
--- a/drivers/hid/intel-ish-hid/ishtp-hid.c
+++ b/drivers/hid/intel-ish-hid/ishtp-hid.c
@@ -22,14 +22,9 @@  static int ishtp_hid_parse(struct hid_device *hid)
 {
 	struct ishtp_hid_data *hid_data =  hid->driver_data;
 	struct ishtp_cl_data *client_data = hid_data->client_data;
-	int rv;
-
-	rv = hid_parse_report(hid, client_data->report_descr[hid_data->index],
-			      client_data->report_descr_size[hid_data->index]);
-	if (rv)
-		return	rv;
 
-	return 0;
+	return hid_parse_report(hid, client_data->report_descr[hid_data->index],
+				client_data->report_descr_size[hid_data->index]);
 }
 
 /* Empty callbacks with success return code */