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: 10075551 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 4A5C56057C 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 3AB8A28A9F for ; Sun, 26 Nov 2017 21:32:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E68928AFF; Sun, 26 Nov 2017 21:32:21 +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 8A4C428ACA for ; Sun, 26 Nov 2017 21:32:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751874AbdKZVcQ (ORCPT ); Sun, 26 Nov 2017 16:32:16 -0500 Received: from mout.web.de ([212.227.15.4]:53445 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbdKZVcP (ORCPT ); Sun, 26 Nov 2017 16:32:15 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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= 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, 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);