From patchwork Sun Nov 26 21:32:06 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: 10075549 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 1EA26602BC for ; Sun, 26 Nov 2017 21:32:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1AFB28AFD for ; Sun, 26 Nov 2017 21:32:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E123128A9F; Sun, 26 Nov 2017 21:32:20 +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 DE9BB28A9F for ; Sun, 26 Nov 2017 21:32:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 90DFB6E1E4; Sun, 26 Nov 2017 21:32:15 +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 246076E1E4 for ; Sun, 26 Nov 2017 21:32:12 +0000 (UTC) Received: from [192.168.1.3] ([78.49.168.181]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MZDQ4-1eZeVn080i-00KzLD; Sun, 26 Nov 2017 22:32:07 +0100 To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz From: SF Markus Elfring Subject: [PATCH] video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe() Message-ID: Date: Sun, 26 Nov 2017 22:32:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:K063SP8uXVsyjhZDWTy0TBKXCblCNsXBcL8NoNu6CpGdqDDEGJ2 tEaQErLCoATZvgVCJI7ii7+j3p05uOemkFGfA1yq2Mh+sogZSjwVAJHYhUzSMTSqMcAd0N4 770gvDTC7XKg8z0EcWwa3qAotvLlzAPuIAgP1ZBwGc9cpFERQpM8OTead2QpneJab8PIqvX ULrMNSj05sZ0Lhb1kzEHg== X-UI-Out-Filterresults: notjunk:1; V01:K0:4cw9lxiCz8w=:3sMwels/7lvDjG+epM3LCq bJn7NJ0StyALlPhx5UgYj+KDfvwwntjj1kZvwvXTEbP0OTKL9LMZUpnTydEp9TZCwnBx3i+oG KXJxI6nP9eQg1EN9Ezwiscu3Pi/NqdYKOFJx7F8rXm7JvYGixwAJzxUQQH2kJljJWwLim1oCo +1Xxj1viVmpMDNunVo/laclYBsrBP0jWlfpIz6AGc+ACUAlOB3j7RSApTeEMgV5lAnX4BMske 9Y/5cUY9JmC7tnDJSNL5jkhwbYjJY+WYuCG/leTfEFbj/jUhDiXSAJft/4VuYkgmzIvPP4v74 jcaiD3jhrkAMFIKf5I/T+O3zo1lxV4jQqriB6GyxUFEa29TytQQOxcvg1HZnOYpc0/afDORu/ 6G3BcvGDzPVDxioUh+YKfuTBIUEmVHploW83KMWJnS8ZfhwrcLY9kLXcbIaDJOWqgFr6GGPg2 MPpCQ20X4+C7Ehjk7IV4PCvbW/lhAdzg6vEjPMLMq4oI3easuIJYeK6wr0v1FumjrYHVDNJUD fSPfnKbhqgHAL/WR57VrSvg11OgCnWLc0Os+xahAelgnHwbOndFA04HFAicUKv9vrUCdXYgjd poEp0dIQsUSgLGVLnvWfLPwognIT9tT4nI9zHCZ3hfrh7W9ihjgFfmTZLf6PXK9ViEIkt/c7Z 9DONNublGyiJelqlIEF3WuD6R7jP/7os7nptQqa5s+C/WiF2DM+nslmk7t2GOYNDIEnh4iYYF tCHuhOV7nw312S2B9gVzwBHmSv8H7pNUpZQU0vy1MEjby1rXqRt+3eWeJh5GcweXIx1UAH4GH bmQDGmiOYKWGYFh4araVvBQRJ0TiW5L9ADhbPyy95o0wMKFjVw= 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, 26 Nov 2017 22:13:55 +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 --- drivers/video/fbdev/matrox/matroxfb_crtc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/matrox/matroxfb_crtc2.c b/drivers/video/fbdev/matrox/matroxfb_crtc2.c index 02796a4317a9..f64e1d55d7a1 100644 --- a/drivers/video/fbdev/matrox/matroxfb_crtc2.c +++ b/drivers/video/fbdev/matrox/matroxfb_crtc2.c @@ -696,10 +696,9 @@ static void* matroxfb_crtc2_probe(struct matrox_fb_info* minfo) { if (!minfo->devflags.crtc2) return NULL; m2info = kzalloc(sizeof(*m2info), GFP_KERNEL); - if (!m2info) { - printk(KERN_ERR "matroxfb_crtc2: Not enough memory for CRTC2 control structs\n"); + if (!m2info) return NULL; - } + m2info->primary_dev = minfo; if (matroxfb_dh_registerfb(m2info)) { kfree(m2info);