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: 10148393 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 BA73B6037E for ; Sun, 7 Jan 2018 16:06:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA2FF2861C for ; Sun, 7 Jan 2018 16:06:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D44B28856; Sun, 7 Jan 2018 16:06:42 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F4382861C for ; Sun, 7 Jan 2018 16:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754282AbeAGQG3 (ORCPT ); Sun, 7 Jan 2018 11:06:29 -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 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 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-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= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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);