lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200921082434.2591357-1-liushixin2@huawei.com>
Date:   Mon, 21 Sep 2020 16:24:34 +0800
From:   Liu Shixin <liushixin2@...wei.com>
To:     Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>
CC:     <linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Liu Shixin <liushixin2@...wei.com>
Subject: [PATCH -next] HID: intel-ish-hid: simplify the return expression of ishtp_hid_parse

Simplify the return expression.

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

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 */
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ