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: 10076139 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 EA6816028E for ; Mon, 27 Nov 2017 09:16:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE54E287C1 for ; Mon, 27 Nov 2017 09:16:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2E4E28DAD; Mon, 27 Nov 2017 09:16:41 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 837A8287C1 for ; Mon, 27 Nov 2017 09:16:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDC5B6E20F; Mon, 27 Nov 2017 09:16:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [217.72.192.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id C636A6E20F for ; Mon, 27 Nov 2017 09:16:38 +0000 (UTC) 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 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= Cc: kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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;