From patchwork Mon Nov 27 09:16:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10076141 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 5A6A06028E for ; Mon, 27 Nov 2017 09:16:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D8DE287C1 for ; Mon, 27 Nov 2017 09:16:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5229228DAD; Mon, 27 Nov 2017 09:16: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=-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 E538D287C1 for ; Mon, 27 Nov 2017 09:16:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751740AbdK0JQm (ORCPT ); Mon, 27 Nov 2017 04:16:42 -0500 Received: from mout.web.de ([217.72.192.78]:54781 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751377AbdK0JQl (ORCPT ); Mon, 27 Nov 2017 04:16:41 -0500 Received: from [192.168.1.3] ([77.182.143.129]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0McWj6-1eamNT3yl6-00Hbx9; Mon, 27 Nov 2017 10:16:32 +0100 To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] video: fb_ddc: Delete an error message for a failed memory allocation in fb_do_probe_ddc_edid() Message-ID: <93d83083-b0ee-5993-3b7b-329999c9afcd@users.sourceforge.net> Date: Mon, 27 Nov 2017 10:16:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:V+/3Z+wLMEJn3CtrZptnqjCr2E8yNEaa93se5WfJNMEVCC0e3fZ NtdsXhYIiN3IBLyV92Id0voV7rlqpNddqywuIIEnLqjlFiTz+ZnObXB2AEnM7oxZkuz9I5h fMgxoNBkISxT4E0P+XN8xgNfo55wu0iLe2NbpGLgGyENaeWhjuzGMnFydS/CCLhtLUL3wF4 5gIW11qE1S8Z66KZCzf1A== X-UI-Out-Filterresults: notjunk:1; V01:K0:gAukXexo8Lo=:+x2asN8NgNAnES2NVjuzna NXKCMmWbOXs/dCenWSS4nzg277W4IVyn1Kc80V+41V2mWUZI5VdLKYq3WvOKI/GBD+rWV7gH6 KJBtfjIaVeMEpXKENaZhkO38cQqhskiAXjKkGcS6ZOjpR/MMloBmfijSP7GobMWzzzxFCv09Z a40MvOqJzpjX1ZvfQhu2GElXJwG2xhQAVJ43J4IqPW0Z0buG6xzE+v07eoE1XPPI2QJWjmkpK TL0vYQ21EDLgRBmsvkYaGBfqPDhz8VmpRxf4HV8UpNz3gaOuINdoTxQLatL+UEYCGAyvW8sx9 lB/B538botBHuQfMqIs7AkiFyHuW6+5MIU5CYNpPY/VK0tHwVdCipFFyk+aSsFOdWoo3sII6h TFtC313ULRedAFYT9sTQxtaJMzzLE+lBS4jweeVWnLniOt0WDGG4UawM8SKHiDMp2jz5dgxMx lXYTiEWq2DlREzT2zVdxV+UbxkCAMmWmJKM9cotGhoyy5h85STr6iMM3IYboJG7JCZtfxMTvN 8V0u/Z7+Q2d5TwvS551AOhWmMdVAt175yi8T3qTDs4QAve4b6vOc4cW3pE4swgCTh8UUqBVv1 0gDxHufiEKov0Xl7xIkTvDzZ6BQf3VP72W1iXcosipAY+0yHHDwTlsn4NHSbUfsAWnBUcSoQA UIASf53wcoTwtT5u3hkiujrpqthYBF/14wivUffm/+Nuy9/YRZRDV8k+uXcrCW/rbf6+sPn/P 80TudEco6dSOpIKYaeSu03m0TvKexdgK0Ay0Pq4JbfB7eky2RsFYriIBREgPGeluuM5EpdbxJ ef/AFAg0kUJFmMg3g0mIef/qoDZcaZsAKtp5A2Zh583dTqGpfw= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Mon, 27 Nov 2017 10:12:26 +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/video/fbdev/core/fb_ddc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/fbdev/core/fb_ddc.c b/drivers/video/fbdev/core/fb_ddc.c index 8bf5f2f54be7..256b518d1db9 100644 --- a/drivers/video/fbdev/core/fb_ddc.c +++ b/drivers/video/fbdev/core/fb_ddc.c @@ -37,11 +37,8 @@ static unsigned char *fb_do_probe_ddc_edid(struct i2c_adapter *adapter) } }; - if (!buf) { - dev_warn(&adapter->dev, "unable to allocate memory for EDID " - "block.\n"); + if (!buf) return NULL; - } if (i2c_transfer(adapter, msgs, 2) == 2) return buf;