From patchwork Sun Jan 7 13:38:09 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: 10148303 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 38297601A1 for ; Sun, 7 Jan 2018 13:38:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2958428534 for ; Sun, 7 Jan 2018 13:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E42F2883D; Sun, 7 Jan 2018 13:38:34 +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 D6D1928534 for ; Sun, 7 Jan 2018 13:38:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF7746E513; Sun, 7 Jan 2018 13:38:31 +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 [212.227.15.3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 022216E513 for ; Sun, 7 Jan 2018 13:38:29 +0000 (UTC) Received: from [192.168.1.3] ([78.48.134.178]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LmhQx-1f7Emy09YZ-00aEUv; Sun, 07 Jan 2018 14:38:23 +0100 Subject: [PATCH v2 2/2] video: udlfb: Delete an error message for a failed memory allocation in dlfb_realloc_framebuffer() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Bernie Thompson References: <6fb11bb4-2c1d-a939-087b-de31c42328b9@users.sourceforge.net> <1768474.zA76iyE2Y1@amdc3058> <25aee051-12fb-de5f-c806-f419fa4c0ef1@users.sourceforge.net> Message-ID: <0caca4c2-bf2b-42fd-5f78-460630015692@users.sourceforge.net> Date: Sun, 7 Jan 2018 14:38:09 +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: <25aee051-12fb-de5f-c806-f419fa4c0ef1@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:gsn6obkVMcRHANFJrQy3RQeEI0lOIkSmDXmrlfthMwk6V4gIFkY k2D8ASPR7CcOARhxHbo7tScUmsANbBvjMLgOIK6wJjspI0Z2HYgwOQZ0P+RT9vasGxKqnt9 3nev3L3zy8EyNJ5eQTHMRFJuuY2a1JM0i4/EcWo5p03W6SpKggcmdPg5/oDBzQIe5SHXMKG t17/JLW+nWgr+7JaykVYg== X-UI-Out-Filterresults: notjunk:1; V01:K0:35FmdCfrocw=:hNj2B/9WUPsb3rdG2XMKfn qNSV5RwNvzGrHlFSnI9g3G4dhrG2VT7R14uVRQJ4HPyzunfyqHeiaGUmbhLMzZ8panprpqT5x vHfCN27Lhfeha4ZY8qiWCcYKg9zmboYVy6DjICyWUpXox0prK10kbFermK7+uGSAt893TdesU y5ubvSTJbfOEFXShNvCnB7BFnpB/Tz4+R5JpnGfcMhzC288AB8Upl2z2hHivHho/ivvsMz9fV ndvJ+RD4LZHAxrM1AD5Do9KbejDGdQNYTHSbSRJrFpIc2w5itSc+5rCj+gmPr4evI8iL2bFYM 7DgPR39znR96qCcP7Z8pfCXD5IuuadL7ck1UWFcTnIy4Ks3dOfRNO1S7EX6nYVLukP02NsfAw mmo1BHO3ouCQD69+JoWGk2+4+W+eBAHBW9/RLhadREOKwTYRqCtBYDAonmACsvbDiDdO3yle9 /B5y4tHV8v2NSmohFHw/hD7lGDt5liBiYVE0SzWhz89r6ckdTmwDUcAKA+sQasVt3i2Vhu5QY 0qSW3cUbtV+etvQXRe42vWaFnJs2XfK+soShhUxLJVatZT8SQiJ3eXyK1+DzlkY6FMpyOdBeY HD9GH+cJOWfk+o3uWTZubXba/e4JBvLy9WTPyXk4GO2fJWwDCSZKcUqGgYHF++FrItxX7qezy meLnecGuqLewLhuq5XssvM2ECQEVVyk4WfDhPIA5ny87yUhj01oQBjr0J7oy7KaYJCbA2dxBM r5X/2/Hckt4aGniHMM8l8wYjEqL912zTwEJu9cuGHERFA6K1iiHO/BrihiAFjnsHmzOlcMoy6 ib+ATV+AOlyhrzXrtxBz/whSVuda8BlHIpWnsV0FrgE+tBy5Zo= 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: Sun, 7 Jan 2018 14:07:36 +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 --- v2: This update suggestion was rebased on source files from the software "Linux next-20180105" together with an other change combination. drivers/video/fbdev/udlfb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 560a6b6044a5..0c781b077aab 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1172,10 +1172,8 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dev, struct fb_info *info) * Alloc system memory for virtual framebuffer */ new_fb = vmalloc(new_len); - if (!new_fb) { - pr_err("Virtual framebuffer alloc failed\n"); + if (!new_fb) return -ENOMEM; - } if (info->screen_base) { memcpy(new_fb, old_fb, old_len);