Received: by 10.223.176.5 with SMTP id f5csp2240071wra; Thu, 8 Feb 2018 10:38:04 -0800 (PST) X-Google-Smtp-Source: AH8x225v3uwefZzaCoPH7UVeeTAnUfLQws/gpfxrpZqoxRJMC8lCHlapzQdHimyKQ+6jNqZ5KFxQ X-Received: by 2002:a17:902:650e:: with SMTP id b14-v6mr35978plk.451.1518115084284; Thu, 08 Feb 2018 10:38:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518115084; cv=none; d=google.com; s=arc-20160816; b=JT7XmbxaooL70ypU2kWNBm3dN4oTcA/4fOYyqJTpd9YbEIwkoYi97jQAvfYF8o/fVg SdUzm2sqVGc5Aom1kQmbPYxVuHRrNiYyf9mjBLHAy82lkGj+AlDwPXKP/lNuVwsPpR3f NiTLhSejLXRLVnkFdYRhahtxlPFKlvxt7pNDGB7XNw+BQc6QQv+e6bYuDhGD0fQ1Hzpj BfG8H1liKh5II2qW87+yoFP3kUcat1IcWzyrK7sODge9X2aE57bwTvSd9ZdgQ2XMLkjg chgJ1Bkfawdtx4WFTy2vtAT4/KS+4mkkvDELZ1J8E2Yh7IlXbxq3EwLSfMPIHX6JKuan j9bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=lasOBxNmP59k1CDr6mKKslL7aSEZWJZXO3CmetMVlhk=; b=ylvQMKWjzn8ASd31yKf0hpY+lTr9hhqGpyt1nsZFUS7RSut7f8L9WzK2AeWlxn56As EFTOcTR0vFjQmXDLjaiPQBALjC9KNWJGGe2QIM7Msi9LbTMBsIAXMPC+7zL2msgCzGV9 1Q9Z888IB5bkYoim/FlRueUjv7/O2JQ8bprGP4XERR1wo5Z49FHW4V45d5U4g7uZXPNc kT/YgXdYBb4RUsGctiDG6Gko/aZmgZdXhGZZKsIQei+BwO8pPDI0nAYciTWOQ2+Jd19o O+UrFGg2NQ92oCuf9TenQYqJIfaVbgb22O0xkuiE7XHXc2lKp2U6q2g41GNx3NLxg6nH r0pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si263459pgt.344.2018.02.08.10.37.48; Thu, 08 Feb 2018 10:38:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbeBHSgc (ORCPT + 99 others); Thu, 8 Feb 2018 13:36:32 -0500 Received: from mout.web.de ([212.227.15.14]:44877 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbeBHSga (ORCPT ); Thu, 8 Feb 2018 13:36:30 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.16.1