From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:53878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbeBDK6o (ORCPT ); Sun, 4 Feb 2018 05:58:44 -0500 Date: Sun, 4 Feb 2018 10:58:39 +0000 From: Jonathan Cameron To: SF Markus Elfring Cc: linux-iio@vger.kernel.org, linux-input@vger.kernel.org, Archana Patni , Hartmut Knaack , Jiri Kosina , Lars-Peter Clausen , Peter Meerwald-Stadler , Srinivas Pandruvada , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] iio/pressure: Delete an error message for a failed memory allocation in hid_press_probe() Message-ID: <20180204105839.606f8d2e@archlinux> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On Mon, 29 Jan 2018 22:04:11 +0100 SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 29 Jan 2018 21:55:08 +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 Whilst the error message doesn't add a lot, it does add some information over a simple memory copy failed error. Hence I think we should keep it. Jonathan > --- > drivers/iio/pressure/hid-sensor-press.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c > index 4c437918f1d2..9de7590d50b0 100644 > --- a/drivers/iio/pressure/hid-sensor-press.c > +++ b/drivers/iio/pressure/hid-sensor-press.c > @@ -280,10 +280,8 @@ static int hid_press_probe(struct platform_device *pdev) > > indio_dev->channels = kmemdup(press_channels, sizeof(press_channels), > GFP_KERNEL); > - if (!indio_dev->channels) { > - dev_err(&pdev->dev, "failed to duplicate channels\n"); > + if (!indio_dev->channels) > return -ENOMEM; > - } > > ret = press_parse_report(pdev, hsdev, > (struct iio_chan_spec *)indio_dev->channels,