Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754015AbeAGNih (ORCPT + 1 other); Sun, 7 Jan 2018 08:38:37 -0500 Received: from mout.web.de ([212.227.15.3]:56774 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753900AbeAGNic (ORCPT ); Sun, 7 Jan 2018 08:38:32 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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); -- 2.15.1