Received: by 10.223.176.5 with SMTP id f5csp1059271wra; Tue, 6 Feb 2018 11:54:08 -0800 (PST) X-Google-Smtp-Source: AH8x226FPBGbF4FQvGCcQ8bx12CSTUcBiTisjgivfHJXKoAorSNgQl51Y86VudRwyleZWNEeiEHt X-Received: by 10.98.3.5 with SMTP id 5mr3525809pfd.215.1517946848272; Tue, 06 Feb 2018 11:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517946848; cv=none; d=google.com; s=arc-20160816; b=LlI5B28Sk8UIQB6BolWOWPQvzA7HoH1mjTM3Jbltwkd6bA2b/SPO5u0ZdE3K4vgTdl 92INWZozEOWhQm8mihfaIEtEIg7H6EiMHMZT7PMN5QJBRnELDXXGqtnxxCooTjDgS3cT /1h2BFzL70+mQANJREu7WFHNOhE+/UzpvqxYLCI33hNbIHexVna5VD3y1PudQXsNqURL Avi+KWj86jygokbVCtsGNeTsyIrfn1hmkOYyYVbOOkX/2Ts7RcJeHCwG3rkx3hum22El JZXdPSBQuZhKs2zPXO5alN1By1LTIsGqpoJ7G+PQktD4wODb7qAVlS+tcYFXvpmVdAC5 pJDQ== 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:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=Iwu0ibZU5nMRf9ciQLWn84LxLnXJ7ew83d3wpAPYBvQ=; b=SoeT0kdtt2+L/HC94uPiH9fVK+WaLOu+iv61Afn6a8OzUpZniVL0ZKfX0PLTO2llaJ NyOUuocC2gbTnXTZA/KZO5ZHP27kb+f8HUuKQoGOZ9TkTAVNQi2cM0PI22AVIVFSqxB5 QQ5JsQ593ck5GfEuTucHi21smGlXTFks/pYiyMqtPVtMPUn0dNmTPmWMCQ7QKtTKru2N WW1ZwZm5B6sDocjmWhuYXMbYIVNsJxXkR74J97xmqIb2ylKMAvQL4kqEKA5mV04z+vHG 2MHbAunvfciTMlB7pDRqJ8G0ZZ5zc+UMdoQ+fe/45QAINf9TpE4L14gCIrtmdHeLVCWG EiTw== 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 q5-v6si7059144pll.88.2018.02.06.11.53.54; Tue, 06 Feb 2018 11:54:08 -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 S1753399AbeBFTxM (ORCPT + 99 others); Tue, 6 Feb 2018 14:53:12 -0500 Received: from mout.web.de ([212.227.15.14]:51235 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752765AbeBFTxL (ORCPT ); Tue, 6 Feb 2018 14:53:11 -0500 Received: from [192.168.1.2] ([92.225.242.179]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lvk56-1emi7X0TV6-017WJH; Tue, 06 Feb 2018 20:53:03 +0100 To: linux-input@vger.kernel.org, Benjamin Tissoires , Jiri Kosina Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] hid-a4tech: Delete an error message for a failed memory allocation in a4_probe() Message-ID: <236c998d-02d4-f120-3d03-4619a2bb89d9@users.sourceforge.net> Date: Tue, 6 Feb 2018 20:52:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:YHdnb06PTueNkCfRCzbaaacZ5s0XIqzvLBSBRrCaeYJakMbpRAq EnH9FKbGt/R6Z2TLMxSvajvD14X7KIZc/WZ/jzpxU9yt5sIKOahb7eogxHL3pQ2KKmHj6SP AkybrWSyHtV0fqqM8c00A/s/yQkwAFzo/WGC34+d4+r5z5N55HBLlBes+sOphIsWPJ578nT qcCYe1E0RiUTXsjjodM9A== X-UI-Out-Filterresults: notjunk:1;V01:K0:nn816PF6jFU=:+ovSlKWET5KrdwOb8U1pDc bIzSfvG7B5vNEZkBLxvllmiASrn5e00utKchQvoY7Jtm2bih+vrgNMtlOOaYdLHBNcu/j95KP lz3czrNInF10JIBCZySEWnIdviaPVrwWCdI5uW2qwdQunCGXuJ2ue4xz7liDrg8/2ZwpU+yHX 36ndpptkDsTmTnqePrgtgnm2KartRSBX9+HwpPmUV/egxCgW0w6VGzv7r/FsiXU4WJCvCRJRQ DJI6lFGKCNFzBFZD3TC8sKPzSw8q69ZNh5xTxEYKUkdKnoAalQF9/iEU8v1/BDbSfH3g0SzcE aE/PLo9Rd5GmHVUEu3VWoBu38BJ/ugvY1u6OZK2WwF1/G7g06LpMNtsGpk1n3rBwyiylfVP1U CLmmjdc6eues/Qkdfj5XNi/VJ4KJtQ56dPSl+dt1Utq7ybRn82GSCl5rLxlFhVtsTSA3XBYDX Qdyt7rVQjq5UuGNTwRe5rphW91IECM9Dn+oLDD+/0ffDFOeJXu71AEtncyTPo2rnarZ5HPwJz XOgcDPY/2qdwU5NfyU13JmIJBrIPHH8g3oT+sbS9F75ZDehgoDRsepTNPkDA+wNu11+JbfM2/ hcjwImx5c2EUdmtlEY32Pjf1k6ISgiJ2KaY91aEGLULCRQA3B4l3A6N5gUI4QoeTFCDYY0ETo Oagf/fPk2/jPd7zl073FoN175lLjciVkOxRGtlKOl6nI1hxPPfORAU1U4efQV1SVKmSQrYyXx DmlIPGBRSZRpnjChi8HxTE05h/JuemSce2ZNXangaEUiPD8e3x5sTZDCYFm3JOY91fllxWGSb gPR0AUE9nviYK/dVUw5rkxnYluebJVGg2PygJKbf78lf0d9BC4= 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 20:48:04 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/hid/hid-a4tech.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c index 9428ea7cdf8a..7a364f17f39e 100644 --- a/drivers/hid/hid-a4tech.c +++ b/drivers/hid/hid-a4tech.c @@ -91,10 +91,8 @@ static int a4_probe(struct hid_device *hdev, const struct hid_device_id *id) int ret; a4 = devm_kzalloc(&hdev->dev, sizeof(*a4), GFP_KERNEL); - if (a4 == NULL) { - hid_err(hdev, "can't alloc device descriptor\n"); + if (!a4) return -ENOMEM; - } a4->quirks = id->driver_data; -- 2.16.1