Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754337AbeAGQGa (ORCPT + 1 other); Sun, 7 Jan 2018 11:06:30 -0500 Received: from mout.web.de ([212.227.15.4]:60609 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754277AbeAGQG1 (ORCPT ); Sun, 7 Jan 2018 11:06:27 -0500 Subject: [PATCH v3 3/3] video: smscufx: Delete an error message for a failed memory allocation in ufx_realloc_framebuffer() From: SF Markus Elfring To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Steve Glendinning Cc: LKML , kernel-janitors@vger.kernel.org References: <1736749.UIs06O4xc5@amdc3058> Message-ID: <93bd62c9-4011-4abd-2a2a-3a65c692974f@users.sourceforge.net> Date: Sun, 7 Jan 2018 17:06:13 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:ixubU/BsyqJbykMwPmeOYCUCi6uwv2LGGX9jBmUKMGE4hOg4QAj HZ+GdyiA2oXQwF1dLYLGcH1d9PSQOOANXe10G6bH6NAGjCaBwlWkbnCVBK5hVUfmLjo2o3a Sh26r3I2ZNf2ONsvCkImOQ27sVRQIv3kW7evlp3crNKoTZ7v3SwOzz2Tjiuy1IIzf/JBHEg 2qrFKhySlzqKTOU3Cltqw== X-UI-Out-Filterresults: notjunk:1;V01:K0:onXX967Iur8=:ppsDQ6skzA9BSFe7YMbL/Z c2rNbYIQsbyfGcCCgTkU7HZs8CAZddswfsdDt671kFbhEq0C5EyFgHhKOUhDWDHpM0WAXoueq 6yC2hLY5s4/5PiP6QxtIV1LvJrYKrDsnH0uL2GTfawl1pixqq8/tErU0yzKDKxMUIujOEFv2v GP15a2ubqm5jDzkDvxCvectLgM6ShGGaM52Mwk0bcnF9albjCHjrsWwK1+Sy+tftrE4EYVhKS h18UA1PRHrT5zJXEogCHOILpMor18et4aDkHRakDEnXK1+5rvxbDVdJpLsMH5US5PIRU6Q7NN 07+f3WptzemX/7PH8kqlSdv5eHEFfCbo5AhbwLyAKnCqFnvH6GvaOVcyCt0QedsQxpQTlyZPU Mc9pxe+YHxqRDsjcYuXCnYKw+HFfgro/UIZTVGMxBF0PrmVSomoPUgof6yoJxODv+Kuy8Jvug 9xw/tUEJN4RfmvQer8IF4v5ejmbGwmpJVrizO2yUaPpABIyZzubL8Bh6Nw2cloMeoQB+WRj// gEnYsvIAjt7iXQfUOT8W6k4YqQ/be5k/QRMSLZsZOJP9EfjuIBnPCR+kOnJFrlV5N+4JhAYEk WPeCw59xg/D+PsyDMuB8/d8PqClHKPZPbLx9IXeroC1Cf7ATi2ZJjLy6kcOfIkN8JEZetnkxq JeZKNFFJRwCD7ir0lbAJqLUZDty15ywQvdEvETlbrDrAUHJQbtUhuxDIKJ+m/vzszIYS38WDS pCc2lOXbe0r6G72mxqHJKY/8qiLgxud6V71AjvN4JjEZr2vHe91133olbosi/a6LC8gFuU4uW fyCz7FPLUsOlSbFPN7VkvexYpgbxGFZqZ2vM0z5okZma5nGtak= 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 16:12:40 +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 --- v3: This update suggestion was rebased on source files from the software "Linux next-20180105". drivers/video/fbdev/smscufx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c index abbded605d68..22b606af0a87 100644 --- a/drivers/video/fbdev/smscufx.c +++ b/drivers/video/fbdev/smscufx.c @@ -1307,10 +1307,8 @@ static int ufx_realloc_framebuffer(struct ufx_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"); + if (!new_fb) return -ENOMEM; - } if (info->screen_base) { memcpy(new_fb, old_fb, old_len); -- 2.15.1