Received: by 10.223.185.111 with SMTP id b44csp494624wrg; Fri, 9 Mar 2018 08:20:26 -0800 (PST) X-Google-Smtp-Source: AG47ELvX4rNZpJKasiFkGOoRym2d4ft6a29Rc5DHezH1ZKl+KDHu7F5BWe0Cz2UcYJMCc9W3tDuw X-Received: by 2002:a17:902:768b:: with SMTP id m11-v6mr28141962pll.185.1520612426338; Fri, 09 Mar 2018 08:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520612426; cv=none; d=google.com; s=arc-20160816; b=A/NsOGZirClJB5LG6mQGBsBqEocix3uzadtTBgapDXkf50Zw30D0nN1QLRqAT4ytuH XXz6Bnvg3QE8ufiwu+MuSg6yJoRebo4XcbVYBDMOGKu88BVkFzrz4XlmJAV8T0L8DZYG RCXAJlsUy9++PMicFfoSTo8dgWXus7X10xvh1casjrh4ba1Eg1r8/yqo582zXcbL8YpR ftoB7Z9cvxjalFAhBZhwwPApjIo25A9+5uGuCY3gb0QSf3d1sQVLDxttm0HnGPxGNisG YfvDiEPXuJvcReul+THXMf9/pu2SgFXZMCnZSzXqLxX4vwLQ0f4MmCl8JhG7cCyE1fC+ Ft+A== 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:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=+Qi73cYgFO/sZlud9Jeijms8CpyP9u7VlIx/OSrcjAI=; b=Qm80r3zQ5Wh8TczhQz94b26sVuX0kzQAbbh8mdsdtChiEHZtQ3dNAEVFZDgs+o9VRR 4IvhXnsShRbqUH81wpvDYe2f7og1E9bJbdFGPeLqdADFePSDLQ4jX3dJ6pBeN3w811dJ ryP1UiKLXq9ICbRJw1S+0ZQj4s5jbwV8MEbY4iaKftZDf6Cg1aiTTgDew8EA8frZ/UYQ KABN71Scy/X3LKz9BjMqfiyP0JhomIr33wY8oW6QVTc7wJ9PqdqlJ8OvBfwGTVq3Kdfp AjLEo5oPt/3kRTTOl6mv9rVXWniaBrxSgyCcIiCsDDzrE7C5V/Ayyu6O8r7J4U27lzpb cu3A== 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 w1si921945pgq.135.2018.03.09.08.20.09; Fri, 09 Mar 2018 08:20:26 -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 S932082AbeCIQS6 (ORCPT + 99 others); Fri, 9 Mar 2018 11:18:58 -0500 Received: from mout.web.de ([212.227.17.11]:55435 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbeCIQS5 (ORCPT ); Fri, 9 Mar 2018 11:18:57 -0500 Received: from [192.168.1.2] ([92.228.30.253]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M73WL-1eiQSA0ift-00wqHV; Fri, 09 Mar 2018 17:18:55 +0100 Subject: [PATCH v2 08/17] mfd: ti_am335x_tscadc: Delete an error message for a failed memory allocation in ti_tscadc_probe() From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Lee Jones Cc: LKML References: Message-ID: Date: Fri, 9 Mar 2018 17:18:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:VjVFdbspcvG5EQdivAYaFxdxp4O5pJB2mydMpMgR0oQ40PzX+uE OCaHjW3/Wj3ey/mHsWy0CCdSiXn+D02+rGUUtkXftrAwXDAsgHGCEzvbihPy4WAHeZlziwg /Z6l1Q5zzadEFVY3+1L+dZDmLKxja12cVINMwTlfsVV9LUGiCWNHDLnparnXSEyIXjbb1Iu PpkeVOk5ePdvHpwuj/bDA== X-UI-Out-Filterresults: notjunk:1;V01:K0:f+XfofWsj64=:9JAtbNq/Y2V6mpEOmqX0XP WPjrtM0LbHjuFKkd9e4gXZRLkehpDAgblxhcy8Ir7yaBYawMZk9ERNhTbJCRlNg/tQR8u9BoM ZyerHopPx5TBlNKqo4LT1JOLPkA4lGKyDBxirLA0AZh6zgiLDAaMRjqj3t1IitvFLSyQKthxl 877CrXlvzG7HXTMxFkYUNNo+6xPwI2VnUnid33Ez6NY6WC8BDkUQwH0LrLhLFoOxjOtB6B3So G9KEQ4I0X/NisXeIIoezlRYPObr6pj5PjI3MliBQ77/BnBOks/cyWoqNahz3VZjyzHO1fUM7B l6YCdPoGIXH3H4bYHu4/KQgBOY/QXIspRIAKawduX79yVBQUyaWEeoBX8QlvP1hLBB8FPjEUi m37fI/XuXFG1r3MMgyh1xL4yoKIea1hBYnEoazdzyqSyLWyLtn8YMegMtgWxapwTlvWPpvKz+ GnvJbGGYUigzobK8CUFeTY55LMpC4IuRmCt6TjlIUhIzKI6dVjUrzvPPqToz3xglUwT6pH3SR ICrNJp6x4HfpilHuHADkZnXR7DmUtrIn1gJIUaGLBLdwjhu3bE6OY6vY5/E1Lt2OHzMHm7hAM ZExqs3wRYevmaXSaVNaPVF9rqGmnNZFWkjReWBIuumCDQdI969gjvplp11iJoSeZtzW+ceE+a AH1cOWaUIWcs6VKSyNuMxgbBWePXIFAwoZCtPh5TM6AuLvAjE0b7fOctyK1E3LI1cTcY+K+12 dxOaPi8LwbobpR4ynauEBysYnywBGEmIA4jEzZ4Iy2YrW3UXpmyoEmwKiGw8G5fDoai23wm9g PhdqOUZJ6tEyu8n2eu3zPFjged4FXSv3gIwGB3G7XauyN6Vh8A= 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 Mar 2018 15:15:51 +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 --- v2: Lee Jones requested a resend for this patch. The change was rebased on source files from Linux next-20180308. drivers/mfd/ti_am335x_tscadc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 3cd958a31f36..47012c0899cd 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -169,10 +169,9 @@ static int ti_tscadc_probe(struct platform_device *pdev) /* Allocate memory for device */ tscadc = devm_kzalloc(&pdev->dev, sizeof(*tscadc), GFP_KERNEL); - if (!tscadc) { - dev_err(&pdev->dev, "failed to allocate memory.\n"); + if (!tscadc) return -ENOMEM; - } + tscadc->dev = &pdev->dev; err = platform_get_irq(pdev, 0); -- 2.16.2