From patchwork Sat Jan 20 20:59:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10176719 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 1FF6F6056F for ; Sat, 20 Jan 2018 20:59:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F2E4205AF for ; Sat, 20 Jan 2018 20:59:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 024AA205F8; Sat, 20 Jan 2018 20:59:21 +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 95226205AF for ; Sat, 20 Jan 2018 20:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932636AbeATU7U (ORCPT ); Sat, 20 Jan 2018 15:59:20 -0500 Received: from mout.web.de ([212.227.17.11]:56730 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932196AbeATU7T (ORCPT ); Sat, 20 Jan 2018 15:59:19 -0500 Received: from [192.168.1.3] ([77.182.145.92]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Ltnmz-1emWBs0ZxF-011DM4; Sat, 20 Jan 2018 21:59:17 +0100 Subject: [PATCH 1/2] Input: tps6507x-ts: Delete an error message for a failed memory allocation in tps6507x_ts_probe() From: SF Markus Elfring To: linux-input@vger.kernel.org, Dmitry Torokhov , Yegor Yefremov Cc: LKML , kernel-janitors@vger.kernel.org References: <1ee278a0-a855-cfb3-fd04-24034ec42a65@users.sourceforge.net> Message-ID: Date: Sat, 20 Jan 2018 21:59:16 +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: <1ee278a0-a855-cfb3-fd04-24034ec42a65@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:uQp+0PSx8Uk1pcQCTMUJzpTEkybO33qrF7N7JZFp1iva+9PlqH3 +HKvVKtGG/QWIgE5A6X40SlUdP1gRuuwjImItPisWR6vqTweyCHOtVhXQWpreoq7KlBCQzp +vcyJ+uhXHfGwtOWcgJSj0SMKm/e6MtDXuab7qqKi/e4ZrXZ3IZgWexxahURJbcSGjFEvUv e7SQAS4ko4UXF51Pfo9AA== X-UI-Out-Filterresults: notjunk:1; V01:K0:aCjGN5k6CyI=:Bn9i7jKLrYMTp8GFgrE6Hg mSiO2LPT60igXr72fYj43ynrn/Vi1R/CSvHUUDIebgjQxd3QP+Uxhz9UbAIOejxsrNHXGXWqU 5MAG/WgASagVVhaKqBBr8mDbotQDfmuP3zPWBCYe8cwmgQchFZGAyNbLL8HsbjhydAUXcMaoS osUiMjmcCNnliJfhN+/2jO9U0v7R3LshI6xBkzdVqV02GWgBqvlIJ4W6oJX3diBmoCYcyFEGe XcSQkRTNN4lW3amGzhNqgmCLNXRhCm6l5lrBc9EsTJV3IO3BhwmZXEx355gJRAT+Wm/VYiVkD c1KiWDWc4Q3/bmkslHDwUjj2kH8V1kIURBViYXn099PVyir3PjuBzB6SU5hC2QKVO5TNPgjWd t0eeo7FKXmQd5iS6BEmAkWXn1HyKFVz/4Voyq76dTvgy2PZrAlI0jjNzmUUf4mfZ+cmRJvJL8 g+KjCyJeekBm5R0SORSp2N7rtrUr13HIlimhdT2ricXn6ZB4MmHHEtWeU1jfVYvxlmJ8DJO/u XbHf+ooXZ8ikXZoR8l8jYAgIuEqDS0zZHiaAecLIJMAmTOqbt3XuJP7fH62E6bljEUTIm2tK4 vT2OnrzRkwNeWI/zFivjszsuZVG/O4oVWJhYvWMgnk71SQzMKS5NcvO9d3Bkc9QaRU9fANrgl Zcw3cNzKcTdCKQQ61MgLeuPXhEbROa10JxytLdXGK1bqDQiGU7JKz2Ho1W5puF4C5V7Lhm/Qi Z+3F2nhW10AGyNavijsV0w6yo+CMgh0hSZBzW9+i5/bZF1YeN0pZZVzOLl/OrsM877SrNWctT tK8fPEldisYbC362+28qy8SSQXK5qjT5P4/KIYCSPnA0Raof70= 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: Markus Elfring Date: Sat, 20 Jan 2018 21:43:54 +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/input/touchscreen/tps6507x-ts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 75170a7439b1..5b2756ec1766 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c @@ -227,10 +227,8 @@ static int tps6507x_ts_probe(struct platform_device *pdev) init_data = tps_board->tps6507x_ts_init_data; tsc = devm_kzalloc(&pdev->dev, sizeof(struct tps6507x_ts), GFP_KERNEL); - if (!tsc) { - dev_err(tps6507x_dev->dev, "failed to allocate driver data\n"); + if (!tsc) return -ENOMEM; - } tsc->mfd = tps6507x_dev; tsc->dev = tps6507x_dev->dev;