All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Sebastian Andrzej Siewior
	<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org
Subject: Re: [PATCH 1/5] drivers/iio: am335x_adc: cleanup on missing DT nodes
Date: Sun, 02 Jun 2013 18:56:40 +0100	[thread overview]
Message-ID: <51AB8758.5010705@kernel.org> (raw)
In-Reply-To: <1369847397-27451-2-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>

On 05/29/2013 06:09 PM, Sebastian Andrzej Siewior wrote:
> Currently we leak indio_dev() if the DT has no "adc" node in it.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Given you are going to end up rerolling the original series
(and it hasn't been taken by anyone yet) this wants to go
in a new version of that not as a separate patch.
> ---
>  drivers/iio/adc/ti_am335x_adc.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index d0317fc..b2f27de 100644
> --- a/drivers/iio/adc/ti_am335x_adc.c
> +++ b/drivers/iio/adc/ti_am335x_adc.c
> @@ -208,8 +208,10 @@ static int tiadc_probe(struct platform_device *pdev)
>  	adc_dev->mfd_tscadc = tscadc_dev;
>  
>  	node = of_get_child_by_name(node, "adc");
> -	if (!node)
> -		return  -EINVAL;
> +	if (!node) {
> +		err = -EINVAL;
> +		goto err_free_device;
> +	}
>  	err = of_property_read_u32(node,
>  			"ti,adc-channels", &val32);
>  	if (err < 0)
> 

WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-input@vger.kernel.org, linux-iio@vger.kernel.org,
	sameo@linux.intel.com, jic23@cam.ac.uk,
	dmitry.torokhov@gmail.com, balbi@ti.com
Subject: Re: [PATCH 1/5] drivers/iio: am335x_adc: cleanup on missing DT nodes
Date: Sun, 02 Jun 2013 18:56:40 +0100	[thread overview]
Message-ID: <51AB8758.5010705@kernel.org> (raw)
In-Reply-To: <1369847397-27451-2-git-send-email-bigeasy@linutronix.de>

On 05/29/2013 06:09 PM, Sebastian Andrzej Siewior wrote:
> Currently we leak indio_dev() if the DT has no "adc" node in it.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Given you are going to end up rerolling the original series
(and it hasn't been taken by anyone yet) this wants to go
in a new version of that not as a separate patch.
> ---
>  drivers/iio/adc/ti_am335x_adc.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index d0317fc..b2f27de 100644
> --- a/drivers/iio/adc/ti_am335x_adc.c
> +++ b/drivers/iio/adc/ti_am335x_adc.c
> @@ -208,8 +208,10 @@ static int tiadc_probe(struct platform_device *pdev)
>  	adc_dev->mfd_tscadc = tscadc_dev;
>  
>  	node = of_get_child_by_name(node, "adc");
> -	if (!node)
> -		return  -EINVAL;
> +	if (!node) {
> +		err = -EINVAL;
> +		goto err_free_device;
> +	}
>  	err = of_property_read_u32(node,
>  			"ti,adc-channels", &val32);
>  	if (err < 0)
> 

  parent reply	other threads:[~2013-06-02 17:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 17:09 am335x adc & tsc, second batch Sebastian Andrzej Siewior
2013-05-29 17:09 ` Sebastian Andrzej Siewior
2013-05-29 17:09 ` [PATCH 1/5] drivers/iio: am335x_adc: cleanup on missing DT nodes Sebastian Andrzej Siewior
     [not found]   ` <1369847397-27451-2-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2013-06-02 17:56     ` Jonathan Cameron [this message]
2013-06-02 17:56       ` Jonathan Cameron
     [not found]       ` <51AB8758.5010705-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-06-04 10:38         ` Sebastian Andrzej Siewior
2013-06-04 10:38           ` Sebastian Andrzej Siewior
     [not found] ` <1369847397-27451-1-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2013-05-29 17:09   ` [PATCH 2/5] input/ti_am335x_adc: use only FIFO0 and clean up a little Sebastian Andrzej Siewior
2013-05-29 17:09     ` Sebastian Andrzej Siewior
2013-06-04 16:52     ` Dmitry Torokhov
2013-06-04 16:52       ` Dmitry Torokhov
2013-05-29 17:09   ` [PATCH 5/5] iio/ti_am335x_adc: check if we found the value Sebastian Andrzej Siewior
2013-05-29 17:09     ` Sebastian Andrzej Siewior
     [not found]     ` <1369847397-27451-6-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2013-06-02 18:03       ` Jonathan Cameron
2013-06-02 18:03         ` Jonathan Cameron
2013-05-29 17:09 ` [PATCH 3/5] input/ti_am335x_tsc: fold regbit_map() and simplfy Sebastian Andrzej Siewior
2013-05-29 17:09   ` Sebastian Andrzej Siewior
2013-06-04 16:53   ` Dmitry Torokhov
2013-06-04 16:53     ` Dmitry Torokhov
2013-05-29 17:09 ` [PATCH 4/5] iio/ti_am335x_adc: Allow to specify input line Sebastian Andrzej Siewior
     [not found]   ` <1369847397-27451-5-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2013-06-02 18:02     ` Jonathan Cameron
2013-06-02 18:02       ` Jonathan Cameron
     [not found]       ` <51AB88BE.6040109-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-06-04 10:39         ` Sebastian Andrzej Siewior
2013-06-04 10:39           ` Sebastian Andrzej Siewior

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=51AB8758.5010705@kernel.org \
    --to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.