linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing
Date: Sun, 5 May 2019 12:48:36 +0100	[thread overview]
Message-ID: <20190505124836.0956f2d2@archlinux> (raw)
In-Reply-To: <20190429152409.23081-1-geert+renesas@glider.be>

On Mon, 29 Apr 2019 17:24:09 +0200
Geert Uytterhoeven <geert+renesas@glider.be> wrote:

> devm_iio_device_alloc() can only fail due to a memory or IDA allocation
> failure.  Hence there is no need to print a message, as the memory
> allocation or IIO core code already takes care of that.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
I'm not totally sure there aren't any paths which can result in an
error without message, but they are at least pretty unlikely 
so I'm happy to take this.

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan


> ---
>  drivers/iio/adc/rcar-gyroadc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
> index 2c0d0316d149707f..2d685730f8673e65 100644
> --- a/drivers/iio/adc/rcar-gyroadc.c
> +++ b/drivers/iio/adc/rcar-gyroadc.c
> @@ -485,10 +485,8 @@ static int rcar_gyroadc_probe(struct platform_device *pdev)
>  	int ret;
>  
>  	indio_dev = devm_iio_device_alloc(dev, sizeof(*priv));
> -	if (!indio_dev) {
> -		dev_err(dev, "Failed to allocate IIO device.\n");
> +	if (!indio_dev)
>  		return -ENOMEM;
> -	}
>  
>  	priv = iio_priv(indio_dev);
>  	priv->dev = dev;


      reply	other threads:[~2019-05-05 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 15:24 [PATCH] iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing Geert Uytterhoeven
2019-05-05 11:48 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190505124836.0956f2d2@archlinux \
    --to=jic23@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).