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: 10075285 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 B33EE602BC for ; Sun, 26 Nov 2017 12:19:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA0CD28C82 for ; Sun, 26 Nov 2017 12:19:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C80A28C85; Sun, 26 Nov 2017 12:19: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=-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 313CB28C82 for ; Sun, 26 Nov 2017 12:19:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752118AbdKZMTc (ORCPT ); Sun, 26 Nov 2017 07:19:32 -0500 Received: from mout.web.de ([212.227.15.4]:55622 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091AbdKZMTb (ORCPT ); Sun, 26 Nov 2017 07:19:31 -0500 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 Cc: LKML , kernel-janitors@vger.kernel.org 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= 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 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);