Received: by 10.223.176.5 with SMTP id f5csp927151wra; Tue, 6 Feb 2018 09:36:00 -0800 (PST) X-Google-Smtp-Source: AH8x224tD27Y83DsqvwWOye4haZDuP9NKvJHL7nLaJQtHo5rN8qE3E+alJ+4AXdnRzgoM/g0H0R/ X-Received: by 10.98.195.2 with SMTP id v2mr3116431pfg.141.1517938560064; Tue, 06 Feb 2018 09:36:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517938560; cv=none; d=google.com; s=arc-20160816; b=Rb/JrD092OwO6tzLXSefvwrOeA5dnrcMIKsbq4IH8c8iLIwkBAnFNiJeduklhOA3Z0 SOaBiAnm5P26AsVsN/WQ6VYYc72DYNCvEqY+wFXmmSs4v8+qRvRX//2UeelgjR0E2V+L TGs1+tjXgaFbU5s1sScgFoDCBKOQo0EgQc9we0O6n1cUKMmvI3ShLkO36mM7Hjd+JFOF ePXgcodeSVT7eN52TCqEoxRZ8jGCnMTyVsqNc++6j5JxYj9XNN1wLSVgHKcb22aiOq1a zlt+CCq8jq3tIeegXXTP3SYg4ZfLYWLdzwm1c3+VPXOoiX0S6Nh7C+QzcOz+zCdh3DRU qTkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=gt2pK2+gb9OpZakozIhV8ez6gi8fKFiT0LW1QQPL1SQ=; b=BqXcTlhjEE7DvDwQMh7ju/b0ceJHU5oQ1TnJAB6Wh8ZtkeeJ+44XZ03kru8SrMuF14 puUDydwhW3CgsiP8C06yBIdIpczdPYYIkdvBskUbLXX3Wn20K8TMYVESbdZXwarZMirF L/ZiB1tg06zSIrlkFyY7orRU66+snFSmfYGruN0e/aBv9QWp58OBy7YpbAs8vin0Ovgq TIRKWbIo7bvfSOhlyIN+sYxrXhqiH6YS5EXcu2GOxqataoCOIcqUVXjW3jV6/dQbRa5/ 6wXx+eleCW87KEe1nZIek6Ib6nncdRTs4h/SLvLZH/7+aBRU9t2qwxrbEY8XxCWI8Nxs 0gpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si1306653pgo.398.2018.02.06.09.35.43; Tue, 06 Feb 2018 09:36:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752941AbeBFRcn (ORCPT + 99 others); Tue, 6 Feb 2018 12:32:43 -0500 Received: from mout.web.de ([212.227.15.4]:58694 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898AbeBFRa7 (ORCPT ); Tue, 6 Feb 2018 12:30:59 -0500 Received: from [192.168.1.2] ([92.225.242.179]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M9GYQ-1eZjQT1JWg-00CeN6; Tue, 06 Feb 2018 18:30:51 +0100 Subject: [PATCH 2/2] HID: asus: Return an error code only as a constant in asus_start_multitouch() From: SF Markus Elfring To: linux-input@vger.kernel.org, Benjamin Tissoires , Jiri Kosina Cc: LKML , kernel-janitors@vger.kernel.org References: <5289ace9-8927-9803-4692-c7c621ab0a8d@users.sourceforge.net> Message-ID: <8408b92e-81fc-89d2-6bf3-e7948673fed6@users.sourceforge.net> Date: Tue, 6 Feb 2018 18:30:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <5289ace9-8927-9803-4692-c7c621ab0a8d@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:J8khilqhjdFLW4FI7CIZY+Z8ytAGj+RfPcIWiOIgx7xOTePU5cT nO06V3MkUbJqtUAIlzHOEeaNB6Um3sb4xESYgTY0B5R4u/Q41420eyKYpz3CcPbyiJT1ZbA KcYb1+Qf+/XgDxkZ4jmIZNnyJhYB9dpKhR0/GzmFGxgI44Fg9mCPJGJeVAZ3LQst1URZoCJ hty2Yq5prJmDLq9ZgXjDw== X-UI-Out-Filterresults: notjunk:1;V01:K0:qpvkx54ATdw=:FqU00HnsAQ4n2UPQx4TMpX VTzYyKsAzL+m9a5X5lJlXpQ0TM+lPhW2EkJ2/6dF9kiDjvocUq651dRiTeoLib6tlbTdMOT9K 0qsVhtvzhPVXwqS3EIAoKeeNpnbTddehxLbCHiSSkBcEv/tMcRjz8ZfIoh42eVbiixFTJu//8 8nKbSwHohHlcI27eDqHHjUQZ3ZS76RuV+jW7BNDkqUxcWaLSzSKoHFR+lhfQoBFAHbKNZfAQe ZO1NSFzVbDMDwmybEvQ/2lPN9BBAVDKBPJvWO/240T6ZTNdmJtwrm/EfP4SxBDdnbLXkI1N3B sy9MhZrzbmo6RqIL2C2rBChltU9ccIxA66uHV/CW5PcT7AxPd6yw/BQxwHopb+RYFHYcDmkf5 6MaXVUDz9vlewFmGhAOQ5ZBpan489YinV4ikS290KCWXwCYk259suzeAUCRH0Qcin39zQSDOl YfBQm7w+F3GmyDYja5WyQwRcrySyfM31CjnrboQTV3qEu6V+kKpvp9/sHS+Js70WXwgjfBPvi 9UPhUIVV3J9dbELkuXfdSDpmEPcbTKaAy0jv4GSGuWzEVZDTERQ4uof+EiXQ4ybkITe+u5vpb SBWEaMx+vbEbx/gKL8+TAyPbjUaX32qPmBLf6AYqiW8PlvVTl6a2iSgv2t3ejN1GEb84Q9Q37 +5zITVfTVq19aXa868pIcAmAa6u7g6KBZKodyN2oQ/R+3YL6bqIHKBFdPjuRozH15FiW9QToP 4FmjMbsO4iWTcVTNmUKEsCszMoC3qWakdTIzJ4HXYOa0dcy49ZbYmNjxr7snnV5nNHU6QN/Ki avYxmhiJviJPkn+ngTn1VXfgw8ipEz/OtdDxKm9mxjoKSWZq5E= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Tue, 6 Feb 2018 18:18:50 +0100 Return an error code without storing it in an intermediate variable. Signed-off-by: Markus Elfring --- drivers/hid/hid-asus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 9573e0b41922..5e143552dab9 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -564,10 +564,8 @@ static int asus_start_multitouch(struct hid_device *hdev) const unsigned char buf[] = { FEATURE_REPORT_ID, 0x00, 0x03, 0x01, 0x00 }; unsigned char *dmabuf = kmemdup(buf, sizeof(buf), GFP_KERNEL); - if (!dmabuf) { - ret = -ENOMEM; - return ret; - } + if (!dmabuf) + return -ENOMEM; ret = hid_hw_raw_request(hdev, dmabuf[0], dmabuf, sizeof(buf), HID_FEATURE_REPORT, HID_REQ_SET_REPORT); -- 2.16.1