From patchwork Wed Feb 7 17:08:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_B=C3=B6hmwalder?= X-Patchwork-Id: 10205677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4275D602D8 for ; Wed, 7 Feb 2018 17:16:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34A7629059 for ; Wed, 7 Feb 2018 17:16:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2992629086; Wed, 7 Feb 2018 17:16:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 037C929072 for ; Wed, 7 Feb 2018 17:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754755AbeBGRQc convert rfc822-to-8bit (ORCPT ); Wed, 7 Feb 2018 12:16:32 -0500 Received: from zimbra.linuxprofi.at ([93.83.54.199]:45630 "EHLO zimbra.linuxprofi.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754392AbeBGRQc (ORCPT ); Wed, 7 Feb 2018 12:16:32 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.linuxprofi.at (Postfix) with ESMTP id 574AF2A0198; Wed, 7 Feb 2018 18:08:21 +0100 (CET) Received: from zimbra.linuxprofi.at ([127.0.0.1]) by localhost (zimbra.linuxprofi.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pzybdN5m5TLr; Wed, 7 Feb 2018 18:08:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.linuxprofi.at (Postfix) with ESMTP id 159B22A0199; Wed, 7 Feb 2018 18:08:21 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.linuxprofi.at Received: from zimbra.linuxprofi.at ([127.0.0.1]) by localhost (zimbra.linuxprofi.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id m8QX0m4E-Ogk; Wed, 7 Feb 2018 18:08:21 +0100 (CET) Received: from localhost (unknown [193.170.135.207]) by zimbra.linuxprofi.at (Postfix) with ESMTPSA id E86002A0198; Wed, 7 Feb 2018 18:08:20 +0100 (CET) From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= To: jikos@kernel.org, benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= Subject: [PATCH 3/3] hid: logitech-dj: delete unnecessary error messages Date: Wed, 7 Feb 2018 18:08:00 +0100 Message-Id: <20180207170800.15015-4-christoph@boehmwalder.at> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180207170800.15015-1-christoph@boehmwalder.at> References: <20180207170800.15015-1-christoph@boehmwalder.at> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove some "out of memory" messages that are considered useless. Signed-off-by: Christoph Böhmwalder --- drivers/hid/hid-logitech-dj.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 59c54cb4bc64..ba5239840cda 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -414,11 +414,8 @@ static void logi_dj_recv_add_djhid_device(struct dj_receiver_dev *djrcv_dev, dj_dev = kzalloc(sizeof(*dj_dev), GFP_KERNEL); - if (!dj_dev) { - dev_err(&djrcv_hdev->dev, "%s: failed allocating dj_device\n", - __func__); + if (!dj_dev) goto dj_device_allocate_fail; - } dj_dev->reports_supported = get_unaligned_le32(dj_report->report_params @@ -1015,11 +1012,9 @@ static int logi_dj_probe(struct hid_device *hdev, /* Treat interface 2 */ djrcv_dev = kzalloc(sizeof(*djrcv_dev), GFP_KERNEL); - if (!djrcv_dev) { - dev_err(&hdev->dev, - "%s:failed allocating dj_receiver_dev\n", __func__); + if (!djrcv_dev) return -ENOMEM; - } + djrcv_dev->hdev = hdev; INIT_WORK(&djrcv_dev->work, delayedwork_callback); spin_lock_init(&djrcv_dev->lock);