From patchwork Thu Feb 8 18:36:11 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: 10207769 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 3AA2360327 for ; Thu, 8 Feb 2018 18:36:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A1E1294F2 for ; Thu, 8 Feb 2018 18:36:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EFE62950D; Thu, 8 Feb 2018 18:36:33 +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 32C3A294F2 for ; Thu, 8 Feb 2018 18:36:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE5446E4F4; Thu, 8 Feb 2018 18:36:29 +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.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0609F6E4F4 for ; Thu, 8 Feb 2018 18:36:27 +0000 (UTC) Received: from [192.168.1.2] ([78.49.237.151]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MarqU-1eQfVU40IE-00KPfj; Thu, 08 Feb 2018 19:36:15 +0100 To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Gustavo Padovan , Sean Paul From: SF Markus Elfring Subject: [PATCH] drm_fb_cma_helper: Delete an error message for a failed memory allocation in drm_fbdev_cma_init_with_funcs() Message-ID: Date: Thu, 8 Feb 2018 19:36:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US X-Provags-ID: V03:K0:yUadrMW+JGLNk1VRjFfGvVjYpMF7ddrTu0xL30aK4dJ5e+yLfbp +OmSEKJG6Ne2QsnocC3EYweHBDNag9l7HtQKFpmU3OiewrhUC2D7irzJhqB7XbQkdIxAYzq N6Yfkco2c1GjsIrC0cbEAPdT7nogLoM7zFfEfoHb5CGGgQToK3VobIDEbBy4lAfKu6AD038 6XUU4e4UcjMk/QlAYKhRw== X-UI-Out-Filterresults: notjunk:1; V01:K0:INDBXYnklwQ=:NjbCIk7/5qf0hgFQErLrR+ 6z6cBH6hk17lgos+oVP+goPLkBVaATNaH57dEVWqEu2R/4vKbUl5DUnUO9siXwXqkobIbo1i7 ou0snIC0nKZAQLtyzJvrxBvReeDP5+4Ee7Q/yciWlQTrvmQIcOKbQlrgJpw2fI4ByROH03edj rLQ+omOoTe6JGPHATt31lHd7I7vxAsW0axoU7y3aFmn78oVb9yAgizmVspqVKmAervKBuNG25 B75D8HRKQSthCxCGcFsuhC6VqKhwi9w6+meZ1B+Myr7QzTLXX41LfftgeWN6cyu6zu1/7Q7YN VwHm4rN6ImOchP6xA4neVqQF6ambYi758XzMgbbIqJ953HXWUp92Sy/3r3UWGsK7EaMqNsVQb XBq8zX0ucWaUv4YvTP9+rlpMG3b1ZH9eGYHfxkO52uxddEQtwDVmnmKe8oA0SElQ7o+Jd49vM lCAkPStgCIK7i+0l8SnTLEt62tLikoOxc4/KkYXwVnegrZIBas0KvznklOUei34oaoVqDrpNd BU6aeMOnXUk7KhJ9J4cXSDk4Aq4jmMM3ywUy3dC0ARf/MMfoCH+wfAEzQz48IeEYwDfR0ew3g yfLX70DI+Hx6MPYsc8mCCunBc1q8KZCERAcu8UAEx0DAjG1BTM8Ius5iUB6b9FDvemcuokPjk AaFQbp6KXo9rK4jEOM3iBPO6kWGhkFw3Qnr4mNTx6Mo5DK2i6th3PiiWW8oB1titBxuIZiTm7 PjPAO4f69V/zDFTwruCm64Z6b/SvMUeF7NZk7OZRc+AT+FmBWxtfJehzZ3AhNIzqHGC6qUIPg 6tMJh2VJ1qKp/eFlbyNHPFJgXodhPNCa96pDjXZOUG2KX1b6/0= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 8 Feb 2018 19:30:06 +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/gpu/drm/drm_fb_cma_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index 186d00adfb5f..59f0d8dbfa61 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -408,10 +408,9 @@ struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev, int ret; fbdev_cma = kzalloc(sizeof(*fbdev_cma), GFP_KERNEL); - if (!fbdev_cma) { - dev_err(dev->dev, "Failed to allocate drm fbdev.\n"); + if (!fbdev_cma) return ERR_PTR(-ENOMEM); - } + fbdev_cma->fb_funcs = funcs; helper = &fbdev_cma->fb_helper;