From patchwork Sun Nov 26 12:19:17 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: 10075287 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 3AD1E602BC for ; Sun, 26 Nov 2017 12:19:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33DBB28C82 for ; Sun, 26 Nov 2017 12:19:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 284CB28C84; Sun, 26 Nov 2017 12:19:34 +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 B098328C86 for ; Sun, 26 Nov 2017 12:19:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4C7F6E1A9; Sun, 26 Nov 2017 12:19:30 +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 307746E1A9 for ; Sun, 26 Nov 2017 12:19:28 +0000 (UTC) Received: from [192.168.1.3] ([78.49.168.181]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lvw4L-1fDCEP0GiL-017pQ1; Sun, 26 Nov 2017 13:19:20 +0100 To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz From: SF Markus Elfring Subject: [PATCH] video: sh_mobile_meram: Delete an error message for a failed memory allocation in sh_mobile_meram_probe() Message-ID: <1feb3cf8-77e6-367e-5f5c-23fdd96339ec@users.sourceforge.net> Date: Sun, 26 Nov 2017 13:19:17 +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:dhYErO+bRRWWMLIrSrlrjBWDDRKEf69E7cFUCEogXLlUq16Vwa+ m1aQuVnldVN1rhq3N9w8DUWUovoDAYwl2+uX5hxTkQY/nxwB+CsVkVMRddayatSWKCCh6Dc uIS9a59tYBXACTU0UAIvwEGBmHHGcxuEOzz3iOhYLBz6aLNdpIs0EdblqcgnJ/nYInK+XHy LZ1mo1wYC/70yW6Ya+KBg== X-UI-Out-Filterresults: notjunk:1; V01:K0:z0Ln7abQkPQ=:fwYbBj+26Ieh6qmUbO+o1j QgnItZNrI5alMb6bUrHvl2g0rb47ixSn8eqp1ZYsz9B7lt4TY+KMkkfZGnh2mfW3UGhTYs93X sX10nwhM7OIZsDF0kBOLtb3QsZgso1zLf3akhFnqdCwtQUV1ls65nD61xx118+IfpCLtk9I9O nbAXD48JbiVF4tWnxl2oQmcU8ZjgaIyfQAcBVybdyDfQFBpOYeGX4b6SXtPKxwg+ISVawQKuu niR0dJvH4IhTWg1bpACOnIwpMdyMkcR4kdN6hTpt1DfiFipg04RlFL3M4m6RewfikAieV1teW ij6fM2Yc+4iAY7PwOo06/ROZuNADxqwsu2OdcSvwFbBHaVZN1Hgj/eY+dFP0dU2W+Rep6ly/t RbFozcFM8bQPPx3QjwYCTYo7B/ZqaqiKFiEP5HQR5/uqbXm4odBGPcfrHHsGrtGard8efuJjc 3e0hbIrnlRtLnsjmc2A/6bm61RP48k3SB6uk+GPmE22vB/XJud2KcWzSkeT/yPPggaNZALyFb 9EKiINW2PEOdCODDEqjbtaBJnZhoZ/JaoOdWMfVhvhxzsGYajwVKtVRPt5ZQ1YJkRu8VUBrUA Ojpf+o6ljI8/JnhxUwo9PJInKXl/7JN5r4jyN3A8gdfTzH4WrvGKEeCuEyknjEgqfZfRK+7+L m5vfhR482aQozsrEKf+xSWf/3de8mWjwtJw+aCkLk0ZD84gdl/0C8k6UoJ6wR8XtqRuha10F8 Xu4Lf1bTeI08QOeDw/6SlcWBNAWWq89fcNJcpEZ3iWF5FdiK7CFKE91GVBrh7B+FcAcwaWDt+ WvMpr4D1K2f3qra8EJGNpsfcvFChQTwIlDEH4Kq16igXzPpT9c= 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 13:08:43 +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/sh_mobile_meram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_meram.c b/drivers/video/fbdev/sh_mobile_meram.c index baadfb207b2e..b5a6735aeb87 100644 --- a/drivers/video/fbdev/sh_mobile_meram.c +++ b/drivers/video/fbdev/sh_mobile_meram.c @@ -644,10 +644,8 @@ static int sh_mobile_meram_probe(struct platform_device *pdev) } priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "cannot allocate device data\n"); + if (!priv) return -ENOMEM; - } /* Initialize private data. */ mutex_init(&priv->lock);