Received: by 10.223.176.46 with SMTP id f43csp1213918wra; Wed, 24 Jan 2018 12:33:09 -0800 (PST) X-Google-Smtp-Source: AH8x226n1PiqxgHY47HLiiZpNe91Dul3hQcSF+eY0+dww/zwsreEGl0H2ECHys2x3dhDBHcWPx19 X-Received: by 10.99.176.76 with SMTP id z12mr11061107pgo.405.1516825989231; Wed, 24 Jan 2018 12:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516825989; cv=none; d=google.com; s=arc-20160816; b=bzN9g9K1lbLwHzxDQpiAzRHKsQYt21YqxX0vkklXAEVmzm7HXSXXdtQVtUQirwzoHs tkY+yomQ0I5Y7UY+LFBo4eEm9GFofeSuJf6shoSA7n7zkBJU64Naw3TUYg9t4oIgEqxU c/mW97ymUcwjwW1bnz+svCnHCrt9luHrpRyJKqe4SrjNNHRgVr4eV4G60REr9oV0yKKy fxPoHc1gyyqBBkPb2EXHEWTf16KWIxspxxjuM0IIFV97W6WJjZyhUCjPH3NRXmqdLmNr OeEAXh4UNYXoyU0jNNqNw8RWdD4oqCMJt1vtdetj7JojwpccnwcibF2G3mp+LqDsz2Na eGJw== 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=Zx1AXO1NqyNTAtu++jyHSgKgIDhiDebKZxZtxSO49w4=; b=GX4pDUz53QJ41BavUCKPvgbEjGub/U/WnBA3Y+xZhp/W/oHeUuR1OUcEKHCC/BhVsL sTtMXEDATFWT7XVaiK996zH6GjtE3kPQDP6UE9gcoegi3RJA2nEsDFn8YRWoavayvfz9 8CYynkkqPjDn7xCkQYS6mwSHzfdY3bhyCjgCQ4EqWODSKWj0lyVudlM6Cs1MezIqhrol ktkrthcjxlyJ3as6blBiyOBnjseNoXRXFkeAF7idyr491+/CL+qP6jDkwnRVdUdsqGrQ 5DliqvzuGomaQdmxDq1oV7/r+rCYWNilleTj3KsS7u3tBHTcWyc0rc87SUDYsb84nksh gddA== 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 a23si3395982pfe.414.2018.01.24.12.32.55; Wed, 24 Jan 2018 12:33:09 -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 S932334AbeAXUbP (ORCPT + 99 others); Wed, 24 Jan 2018 15:31:15 -0500 Received: from mout.web.de ([212.227.15.14]:53359 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932072AbeAXUbN (ORCPT ); Wed, 24 Jan 2018 15:31:13 -0500 Received: from [192.168.1.2] ([77.181.242.198]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Mf0a9-1ePGER1hiD-00OWL6; Wed, 24 Jan 2018 21:31:10 +0100 Subject: [PATCH 2/3] Input: bcm5974: Return directly after a failed kmalloc() in bcm5974_wellspring_mode() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , Henrik Rydberg Cc: LKML , kernel-janitors@vger.kernel.org References: <0505482c-287f-8809-76e3-960cf45b3c0a@users.sourceforge.net> Message-ID: <8befb181-9f0e-84f4-9080-4bde3d666a3b@users.sourceforge.net> Date: Wed, 24 Jan 2018 21:31:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <0505482c-287f-8809-76e3-960cf45b3c0a@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:+BKLtoNbSWWQG13ec9Sr1xgltVj50C8FKyQ7xysy/m6LabVi8Tc tL2t++jPjSJ548XfbJ+YTlXMzClWV8FQivu5CWL0HK0OhVGD2Il5ilLdMtj4RdBRdRVGA3a p9/8JsOAM2h1BCgC4RVpZ4awwYPdwqNEAj4Hp+V6clKaee6eXQAbMd811PL0MSpu2gI/QOV 3tW7k/SLG+zweMC7pts/Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:Zj6uKw2b1YI=:/Ak0XqZNF5Ucc3Ah8fLs2L dn+eBbS6TiV9PK+PgKSctsQpskb77YS9MYR0hlSi5+fOqktf5In7WYnKahdXSJ3URkzmgLkdH 6bE/3LgvtMy/4SwRSUOGQlvmrebNYh6n73XL9aT5TSW4QI5m/uIG9T1Jc3NTQwF9itAIlYX41 +f6utaQwM7IOigYg8AL/K2bq1ZzmRWtQjXKUjodLJ+PmIYWwUWy5uu7qqiGhviSpi0SqMMzVn puLdVohF3dik8dC/GqQy3qXWEGANCpLY8YDL41RrrltoOKbyYYAazawSuHBwgxzK/CF8Ag3KF +ZHXGvCL5Rk9neI4gIQ/xlig5yTealy5+4mNNYk5OrCdOpO6o+sk/W3h0a7qpzWriIE76DVeu FN0c0wdx7U8CPmevEvSblzl+3AlQsc2mxD/s4daLJg7uINFzPGovN8/kg3gbPOLD31xdCTiWf RDwI+kfaSemKN30i3cehEzkz7wQtV6cXCNdQpJ+SIsYAJHZyYH8cmjZ/mvkHSrzpCl+G9jGXR 5p7Q6ihmwxQ0lZD3IC6tXxIdQtS/OR4JT4Zl+S2rOIw5ogkwZ1QgZR5IiR4wyZQ4Miuso2Po4 QxLoMer5EXJ1bEfedFC4KQ20SBhq9yWuENKH0WqKMIVLFtJTfWtMOwWDiSBsCZzFh17AntKwD lzAhSHviQj9DgIA+pnmoIVOuGnIXkeBtt33a6GG7Wl5o+eqOAdOoBJdmLW+i3aDhoqUAZE4yb SbbWKZIgh99ylv7FyFF1uMeiLkJigZiUOC4z1aUJ1HUyYd6qbvEmLXRCG/gCrLWSulcMoAPiM TSzk+7ezMOoNkAOrIOnAJywkSQ1fZGJ2lRgz6DDqdbaO8eJfc8= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Wed, 24 Jan 2018 21:14:51 +0100 Return directly after a call of the function "kmalloc" failed at the beginning. Signed-off-by: Markus Elfring --- drivers/input/mouse/bcm5974.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index 994805513df9..685f56c08931 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -669,10 +669,8 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) return 0; data = kmalloc(c->um_size, GFP_KERNEL); - if (!data) { - retval = -ENOMEM; - goto out; - } + if (!data) + return -ENOMEM; /* read configuration */ size = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), -- 2.16.1