Received: by 10.223.176.5 with SMTP id f5csp1044744wra; Tue, 6 Feb 2018 11:36:08 -0800 (PST) X-Google-Smtp-Source: AH8x2253Ea9Yc+an5d+TcaEvWnA10IVF4Dh6c6AnzghPUgC1rYpxttl+bzvsVcL3tP73A/Fz5+a4 X-Received: by 2002:a17:902:7082:: with SMTP id z2-v6mr1453057plk.244.1517945768480; Tue, 06 Feb 2018 11:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517945768; cv=none; d=google.com; s=arc-20160816; b=PrYOl0fY0TPv9zLjOMUnx9DWLKCVJ2qE+21sfiLJZNNcQv3EOtRER4t+kGXuKuBS6W 0hiRw/EsvvZwLXUOYo4YomMNbBJfyczomLpKsFbZM9ETUzze7wj5mmNR8tvmsGptHudh DUMkDdAgR4aMZ9QEbINCyw4pdR2XF99ShePMItBJ7tberEhltxmTwC7I5Y2fBo1PrG+E 6UU6Mr0ReCfEs0NRn1UZa4OsRfosJ2iHaMEHOFvTju4fwiaGL5tOpT9pv6PLBBIDa9DB 9Xw+M7lFdrVCquIMuRdew7doOHn2J3glCcU1n91LrTDZyo2Dx3N62jsBJZpFTKshgxmg EpBg== 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=lOLmYHGCbZh4jP/gZtjUFYGQmhl3qfg/zLBv281npEE=; b=eFL3yp8oId1HJ4IrFJMnmCXJybDVfLmteY8DaIARC1ZPYNVj9nkLF5eltpxr5GFIaG JdmlFhUCmGU1DUzcFxkoWRU7YSnwH02Rs1vzD2NVzOzyse35BtzJWYgsfg3Euzof/LgD 2SDWBAPQcPOSj841ElOZipr2LduGGK2lt1r4YU+jncrHErOf/SW1MBZo2BWn3SFjMGgQ do22qIvnGzVUfI6lNtjGaKI1rCdhgba4G38PggHc3lWII2OSlfRLsEBhLeBp5z3V0L3L 0bkoxbgDc2vfNatgDlPp+YakLTytExeWVZ737khiT+YQuV8R17xD/NEh6w1H6xpWYbBA ZFdg== 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 w9-v6si8976148plp.58.2018.02.06.11.35.54; Tue, 06 Feb 2018 11:36: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 S1753057AbeBFTfP (ORCPT + 99 others); Tue, 6 Feb 2018 14:35:15 -0500 Received: from mout.web.de ([212.227.15.3]:55013 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752871AbeBFTfN (ORCPT ); Tue, 6 Feb 2018 14:35:13 -0500 Received: from [192.168.1.2] ([92.225.242.179]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LdVdS-1f9AA903Iw-00ihf8; Tue, 06 Feb 2018 20:35: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: apple: Delete an error message for a failed memory allocation in apple_probe() Message-ID: <83d48f20-dd03-00fc-bfea-cd4a87b7254c@users.sourceforge.net> Date: Tue, 6 Feb 2018 20:35:01 +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:PKLF/mLMbrGIzysumkACsdbSDGQL4jivvxY9EpTyq+Ioh45w3T4 yNtZ6qzGpDf1Cpcg4+wO+n2nkkeol1EiOPsNN7mtp6KfB9ZsJ4fDESxfgntQY8b0B9/80UC inXibJf4e9TTxXkG7yW9GYIllEASBD9m0MRWsxDGcYVm6QbE85k+cNrn4jjliN3WNaBv/vF BmvJ9HsWbfrfeYXrvJSqA== X-UI-Out-Filterresults: notjunk:1;V01:K0:T2m60o57pe4=:yQG/iwwV6HHLiAV41NZHf9 ilBRJZrd8pZFf0naCNjs6Xhfm30Hik27xz5aG/NJ3ARH0NO8WNuOcnjRUsfdNvXBrjFNwdOO0 k75ipFZV8WSM7y+QyXcM3koNpzFVfGqAzWC6+3+CVoIrIjMB9Vf9bCa/X4mMcxNW5/a+1Ozdt QQRhNxlUTXTjd+yfs0GExoqDFOSYBWcJLd0WrHJbjmEgYaL27aH0zfPGlWtYDKsjSYDY0xPUG bqTDsrapV5ywMhO0viztueiLwuYlhpdH6LwYz2WZYlDrSsntO9Kf6Re/Q7HCnMLrqrSFqXHuG QKwlRZxvRXNx2ifBY6rYlkjT5UX7WFsmEZjkDkqwM2/F32VQViJWrKOYk0cSpiMVPpZuvqB/Z b0LpbvRULX+aTzPOUeoVdre32EeS9Fl/YtxMMWqF4YttSL+iVPAB7cn3Hd5ngDtQFqOE8TZzj +vJ0dNOVCDx9bFok2bxU6BCh1oqyAQZ4AMeiD8n6ZBwfbFeaXz1LEnOxVaKmOCdMZpJgXc/xG GJKKrzua4ev7x6v52Eow0vUAzG/VWkNVWciDyZvygOPK0kLwGgbxpkCvasvgKore6F7wtuXRD PQbtnadJEgQq6oWsXXsAUEV8VVgkuq1ZNRQww1Dxq8fYgMwII+YldgePrrCRpTn0oWnd3amF9 YHaShpQ+8LNxRsWVin/PwgmB7nfCvI8gKJNKGw1gOB9Ed9bBEXWE/e21F+bm4uIcFBvW9/XFN GNnwzYg/6gV9rjsmn2QxhqgrWvqh1m12L61r5DjGbgUiPGUx20ckNHIpTzqbweojomYUwl+xI GwbXf22b8A3STTT5Iid1uHL+JdIsuTDmJP7VJUKols/TxIvPbQ= 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:06:53 +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-apple.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 25b7bd56ae11..d739dd3aa622 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -374,10 +374,8 @@ static int apple_probe(struct hid_device *hdev, int ret; asc = devm_kzalloc(&hdev->dev, sizeof(*asc), GFP_KERNEL); - if (asc == NULL) { - hid_err(hdev, "can't alloc apple descriptor\n"); + if (!asc) return -ENOMEM; - } asc->quirks = quirks; -- 2.16.1