From patchwork Sat Nov 25 20:44:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10075097 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 EF93C602BC for ; Sat, 25 Nov 2017 20:44:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E295328DA0 for ; Sat, 25 Nov 2017 20:44:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5A0B28DBA; Sat, 25 Nov 2017 20:44:41 +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 9092528DA0 for ; Sat, 25 Nov 2017 20:44:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbdKYUo3 (ORCPT ); Sat, 25 Nov 2017 15:44:29 -0500 Received: from mout.web.de ([212.227.17.12]:52422 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751423AbdKYUo1 (ORCPT ); Sat, 25 Nov 2017 15:44:27 -0500 Received: from [192.168.1.3] ([92.228.138.71]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lpw2l-1eoi9826R5-00fgku; Sat, 25 Nov 2017 21:44:17 +0100 Subject: [PATCH 1/5] video: smscufx: Delete an error message for a failed memory allocation in two functions 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: Message-ID: <2bf3be6e-1839-53cf-479a-d1cbc45015c1@users.sourceforge.net> Date: Sat, 25 Nov 2017 21:44:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:DaXxL40xiSidop9Kbu+oGZdVkyxRXvo5eGvgJJdI4RD9WvsL1GO ANmcYhgZoeipKhh0ddk5wzGssNGhvPtgEciRgPDBW+mZtc8i88OQZgJTA3KjNzlAOxPuyzq ox4C/pMBLRILHBoiHNUoMRSFP1mCaOFyH913xoiYj4QfAV1VXfEveGTINQzpcphWWvI88J1 fBGs04OhW2T6CyjwbzIzA== X-UI-Out-Filterresults: notjunk:1; V01:K0:F74tyBwbBqs=:hbv//IlQM/AA4AN024AyQR HIDwI7952h4e6N8M9ESu+LX8CYWmn0cunagJM7PS+bU/DnGvWzn1/tXIhVDNM9ntisjhqNon3 EZxoMbnqROhvT+vNCIIYQIDru9r+cRoh/FFqLtbHeEGdOR/S3a5FyxRoKlhqCqg2FIT5Wyi22 ZPAc4HMipM197bJZVfXA/WLVyN19R8kDUQQ1GjSYMRsVQLhwgxNmSjuaM6psR+xH2aCeFaN1I q63LbzdQuZF2r+lRLXM4+gCDsfWcq0YzscqVlCehWreHXcl9FhH2uN4S3gLH476K+QwHLEGAh 48ikUKSAH186/rmeGsldrPaSXlTRT9DLUAnY1gUTN0J61PnV9co6ID5rHG16d5lya39S8N+ll gyMAReKpa0ka5KvJWd/adH0Sd1X73I/n6u8rPeUWKTaprMGEPECXVtjCTeIZHWBz8YRW2q+RD IOt+iGGn0Us319TIv4GhYFSabG+//1lz76wjXwcIY3zvAH+bYRWWSKAK+0DIun9qaxsECCcXP xqrC0iWdl3jSG5ILM+nXRtg0XwdzSs3inxWRRxr2B3Htu+TDw0ABaIxKbqiR5OVaK0Baatkug s+eZRemj6SyvbuyMKBaDoCwZjbYp2D2Q91P73AY6AS/kxuNjiA5uOF86Lebv4ewsl62Ozyzp+ EFnrnUfroRBID91yURRDwm8t6cnTM3qmS2c+dAM1WF9upsJVHNfsbYoStLE+8vW+u+zBWfYC4 5K2VemrPZ32HcnVRH03afWyNJqbLV2w3ZRQ4fNiCBWOaAbj5kFA5bfq7zOYFRVMsTiPwF/N6n XW3UIorJEWD21J2Vt3gBt4rwdhwPsHdSfZl40npBCgF9yYZBKA= 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: Sat, 25 Nov 2017 18:32:29 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/video/fbdev/smscufx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c index 2275e80b5776..32de07d77184 100644 --- a/drivers/video/fbdev/smscufx.c +++ b/drivers/video/fbdev/smscufx.c @@ -1309,10 +1309,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) goto error; - } if (info->screen_base) { memcpy(new_fb, old_fb, old_len); @@ -1630,10 +1628,8 @@ static int ufx_usb_probe(struct usb_interface *interface, BUG_ON(!usbdev); dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (dev == NULL) { - dev_err(&usbdev->dev, "ufx_usb_probe: failed alloc of dev struct\n"); + if (!dev) goto error; - } /* we need to wait for both usb and fbdev to spin down on disconnect */ kref_init(&dev->kref); /* matching kref_put in usb .disconnect fn */