From patchwork Sun Jan 7 16:06:13 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: 10148389 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 4E17F6037E for ; Sun, 7 Jan 2018 16:06:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F0D82861C for ; Sun, 7 Jan 2018 16:06:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33F5528856; Sun, 7 Jan 2018 16:06:28 +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 C8B8E2861C for ; Sun, 7 Jan 2018 16:06:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8899289BB0; Sun, 7 Jan 2018 16:06:26 +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.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id C14A589BB0 for ; Sun, 7 Jan 2018 16:06:24 +0000 (UTC) Received: from [192.168.1.3] ([78.48.134.178]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Ma2V5-1eJZvL1hNP-00LqMF; Sun, 07 Jan 2018 17:06:16 +0100 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 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-Language: en-GB 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= 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 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);