Received: by 10.223.176.5 with SMTP id f5csp1391926wra; Sun, 4 Feb 2018 03:01:59 -0800 (PST) X-Google-Smtp-Source: AH8x225QApY4qTFX4dXV6d3mwfFbfuaekEVJEK3pRMKM/pVM9xeOpDVOpXFVwh/yOpSvHLknBUp6 X-Received: by 2002:a17:902:8601:: with SMTP id f1-v6mr2232857plo.380.1517742119675; Sun, 04 Feb 2018 03:01:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517742119; cv=none; d=google.com; s=arc-20160816; b=kKoGf6jFLbS3JNe3eEMxoxdPVpt+SWCCCk9In2may+mQL5dsbCaY3wPweYYQCGuxxV 7kuOk46fuyshfoFdawcSQXzqtZSO4Rlwngnui1x9Lmxubd4yGj+Y0x32NN6i+KNEVCH+ FcmjwkhORFaMqa7gVgLO8z3awpoBuROr04usRkYI4OsSRN5NjYRC1Ul9qsxrDhzExlYV br54X1rSSlu++w9k4h3WvdJz6xD2px5iznmLLow7UJtVfSWUgyx0Wt1W2zm86ymbzjwK O6D8em/mQfqxqyJWPWayDNSSK4hVlekZGFwil8hd2OpZ7HZn46YQ/HYcp49nh2MtbmiY 9RdQ== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=C76wTzhzGOyBc6MUUOoPulfPl5iiKY8ADAOBpOLErxk=; b=w/wL3W5iQfL0pUMlF0tAy8zyUhFC2GUdMt7NYbrK0DwelFpC5jpmO8G7GEDblHQcqX BqW+k927Is03602aKDSIor/PPBDU0FQlMPNFSrNHq2tYgyYDNbSVrS7tgaD1HL/1V1Vr mAib/HQJip89VaJEXgoMpTdqBGLSLJy06Efe/OhmWgOf3IlbD89+xdsSwnPpXDEy5KfN BAzQLK9zAv5qBTScQ+sReVGTOeEUiadWft4JCO21Olyof4+lWGONITzmnYRTpF0bJ3y9 i00UjNMWNT1kNAAs9O5gsGZ/VulkW1oAlDfqOXRgyGXNxBosmwIQbAI5FYX3n/RlvpOP 5aJA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t74si762496pgc.649.2018.02.04.03.01.44; Sun, 04 Feb 2018 03:01:59 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbeBDLBR (ORCPT + 99 others); Sun, 4 Feb 2018 06:01:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:54098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbeBDLBM (ORCPT ); Sun, 4 Feb 2018 06:01:12 -0500 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EDC4A217AB; Sun, 4 Feb 2018 11:01:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EDC4A217AB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org Date: Sun, 4 Feb 2018 11:01:07 +0000 From: Jonathan Cameron To: SF Markus Elfring Cc: linux-iio@vger.kernel.org, linux-input@vger.kernel.org, Hartmut Knaack , Jiri Kosina , Lars-Peter Clausen , Peter Meerwald-Stadler , Srinivas Pandruvada , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] iio/orientation: Delete an error message for a failed memory allocation in two functions Message-ID: <20180204110107.19861b13@archlinux> In-Reply-To: References: X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Jan 2018 22:26:15 +0100 SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 29 Jan 2018 22:20:07 +0100 > > Omit an extra message for a memory allocation failure in these functions. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring Same response as previous patch - it might not be adding much information, but it is adding some so we should keep it. Jonathan > --- > drivers/iio/orientation/hid-sensor-incl-3d.c | 4 +--- > drivers/iio/orientation/hid-sensor-rotation.c | 4 +--- > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/orientation/hid-sensor-incl-3d.c b/drivers/iio/orientation/hid-sensor-incl-3d.c > index 1e5451d1ff88..742c0e0eb4cf 100644 > --- a/drivers/iio/orientation/hid-sensor-incl-3d.c > +++ b/drivers/iio/orientation/hid-sensor-incl-3d.c > @@ -336,10 +336,8 @@ static int hid_incl_3d_probe(struct platform_device *pdev) > > indio_dev->channels = kmemdup(incl_3d_channels, > sizeof(incl_3d_channels), GFP_KERNEL); > - if (!indio_dev->channels) { > - dev_err(&pdev->dev, "failed to duplicate channels\n"); > + if (!indio_dev->channels) > return -ENOMEM; > - } > > ret = incl_3d_parse_report(pdev, hsdev, > (struct iio_chan_spec *)indio_dev->channels, > diff --git a/drivers/iio/orientation/hid-sensor-rotation.c b/drivers/iio/orientation/hid-sensor-rotation.c > index a69db2002414..cbf5e406b1ee 100644 > --- a/drivers/iio/orientation/hid-sensor-rotation.c > +++ b/drivers/iio/orientation/hid-sensor-rotation.c > @@ -277,10 +277,8 @@ static int hid_dev_rot_probe(struct platform_device *pdev) > indio_dev->channels = devm_kmemdup(&pdev->dev, dev_rot_channels, > sizeof(dev_rot_channels), > GFP_KERNEL); > - if (!indio_dev->channels) { > - dev_err(&pdev->dev, "failed to duplicate channels\n"); > + if (!indio_dev->channels) > return -ENOMEM; > - } > > ret = dev_rot_parse_report(pdev, hsdev, > (struct iio_chan_spec *)indio_dev->channels,