From patchwork Fri Jul 20 21:51:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Dyer X-Patchwork-Id: 10538495 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 9EBCB6029B for ; Fri, 20 Jul 2018 21:52:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9209429170 for ; Fri, 20 Jul 2018 21:52:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 844C229191; Fri, 20 Jul 2018 21:52:43 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 2D78429170 for ; Fri, 20 Jul 2018 21:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729999AbeGTWmL (ORCPT ); Fri, 20 Jul 2018 18:42:11 -0400 Received: from avasout06.plus.net ([212.159.14.18]:48149 "EHLO avasout06.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729117AbeGTWmK (ORCPT ); Fri, 20 Jul 2018 18:42:10 -0400 Received: from hairyalien ([80.229.148.18]) by smtp with SMTP id gdJffIgOiWLW2gdJgf5XFC; Fri, 20 Jul 2018 22:52:01 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=fJUXI6Se c=1 sm=1 tr=0 a=o7Djd4SkmPXITDn8qH+ssQ==:117 a=o7Djd4SkmPXITDn8qH+ssQ==:17 a=R9QF1RCXAYgA:10 a=V0UhwjhiAAAA:8 a=VP-kpNrJ8D7Mw6TV3z8A:9 a=biiqoiEWpCWGFnDq:21 a=PkcNIt57vdPO81cB:21 a=_UVLBGXn8Au_dgoMdIS7:22 Received: by hairyalien (sSMTP sendmail emulation); Fri, 20 Jul 2018 22:51:59 +0100 From: Nick Dyer To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Chris Healy , Nikita Yushchenko , Lucas Stach , Nick Dyer Subject: [PATCH v1 04/10] Input: atmel_mxt_ts - remove unnecessary debug on ENOMEM Date: Fri, 20 Jul 2018 22:51:16 +0100 Message-Id: <20180720215122.23558-4-nick@shmanahar.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180720215122.23558-1-nick@shmanahar.org> References: <20180720215122.23558-1-nick@shmanahar.org> X-CMAE-Envelope: MS4wfBA5dMsXA9VkdUdHS5scszU3hw7sui8xLLBYia4n/j0TuTkYpjXSNd03eyXeJNQBIJP+0N2Zmch7+QMThL/j3PAjszNX5zm8cZgT+jDMGHZ2gLBaLwdH UQIDXgmjPZ9KfbDuZtMpKc47LPSZssyQNY8ZnrQTrS4jgdgJ4iUiEQJU 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 From: Nick Dyer Signed-off-by: Nick Dyer --- drivers/input/touchscreen/atmel_mxt_ts.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index dcafb812ee7e..92661aa910ae 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -1520,10 +1520,8 @@ static int mxt_update_cfg(struct mxt_data *data, const struct firmware *cfg) MXT_INFO_CHECKSUM_SIZE; config_mem_size = data->mem_size - cfg_start_ofs; config_mem = kzalloc(config_mem_size, GFP_KERNEL); - if (!config_mem) { - dev_err(dev, "Failed to allocate memory\n"); + if (!config_mem) return -ENOMEM; - } ret = mxt_prepare_cfg_mem(data, cfg, data_pos, cfg_start_ofs, config_mem, config_mem_size); @@ -1982,10 +1980,8 @@ static int mxt_initialize_input_device(struct mxt_data *data) /* Register input device */ input_dev = input_allocate_device(); - if (!input_dev) { - dev_err(dev, "Failed to allocate memory\n"); + if (!input_dev) return -ENOMEM; - } input_dev->name = "Atmel maXTouch Touchscreen"; input_dev->phys = data->phys;