All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Johannes Thumshirn <morbidrsa@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] iio: adc: checking for NULL instead of IS_ERR() in probe
Date: Sat, 14 Jun 2014 15:17:23 +0000	[thread overview]
Message-ID: <539C6783.4060607@kernel.org> (raw)
In-Reply-To: <87lht2q86y.fsf@sauron.localdomain>

On 12/06/14 19:44, Johannes Thumshirn wrote:
> Jonathan Cameron <jic23@kernel.org> writes:
>
>> On 28/03/14 14:07, johannes thumshirn wrote:
>>> On Fri, Mar 28, 2014 at 9:33 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>>>>
>>>> mcb_request_mem() returns an ERR_PTR(), it doesn't return NULL.
>>>>
>>>> Fixes: 74aeac4da66f ('iio: adc: Add MEN 16z188 ADC driver')
>>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>>>
>>>> diff --git a/drivers/iio/adc/men_z188_adc.c b/drivers/iio/adc/men_z188_adc.c
>>>> index 6989c16..b58d630 100644
>>>> --- a/drivers/iio/adc/men_z188_adc.c
>>>> +++ b/drivers/iio/adc/men_z188_adc.c
>>>> @@ -121,8 +121,8 @@ static int men_z188_probe(struct mcb_device *dev,
>>>>           indio_dev->num_channels = ARRAY_SIZE(z188_adc_iio_channels);
>>>>
>>>>           mem = mcb_request_mem(dev, "z188-adc");
>>>> -       if (!mem)
>>>> -               return -ENOMEM;
>>>> +       if (IS_ERR(mem))
>>>> +               return PTR_ERR(mem);
>>>>
>>>>           adc->base = ioremap(mem->start, resource_size(mem));
>>>>           if (adc->base = NULL)
>>>
>>> Acked-by: Johannes Thumshirn <johannes.thumshirn@men.de>
>>>
>> Acked-by: Jonathan Cameron <jic23@kernel.org>
>>
>> Or I can pick this up after the merge window has closed if Greg hasn't
>> already taken it.
>>
>> Jonathan
>
> Did someone actually take this patch, or was it somehow lost?
>
I've picked it up now and applied it to the fixes-togreg branch of iio.git

Thanks for pointing out I'd forgotten it and sorry about that. I've also
marked it for stable.

> Johannes
>


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Johannes Thumshirn <morbidrsa@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] iio: adc: checking for NULL instead of IS_ERR() in probe
Date: Sat, 14 Jun 2014 16:17:23 +0100	[thread overview]
Message-ID: <539C6783.4060607@kernel.org> (raw)
In-Reply-To: <87lht2q86y.fsf@sauron.localdomain>

On 12/06/14 19:44, Johannes Thumshirn wrote:
> Jonathan Cameron <jic23@kernel.org> writes:
>
>> On 28/03/14 14:07, johannes thumshirn wrote:
>>> On Fri, Mar 28, 2014 at 9:33 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>>>>
>>>> mcb_request_mem() returns an ERR_PTR(), it doesn't return NULL.
>>>>
>>>> Fixes: 74aeac4da66f ('iio: adc: Add MEN 16z188 ADC driver')
>>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>>>
>>>> diff --git a/drivers/iio/adc/men_z188_adc.c b/drivers/iio/adc/men_z188_adc.c
>>>> index 6989c16..b58d630 100644
>>>> --- a/drivers/iio/adc/men_z188_adc.c
>>>> +++ b/drivers/iio/adc/men_z188_adc.c
>>>> @@ -121,8 +121,8 @@ static int men_z188_probe(struct mcb_device *dev,
>>>>           indio_dev->num_channels = ARRAY_SIZE(z188_adc_iio_channels);
>>>>
>>>>           mem = mcb_request_mem(dev, "z188-adc");
>>>> -       if (!mem)
>>>> -               return -ENOMEM;
>>>> +       if (IS_ERR(mem))
>>>> +               return PTR_ERR(mem);
>>>>
>>>>           adc->base = ioremap(mem->start, resource_size(mem));
>>>>           if (adc->base == NULL)
>>>
>>> Acked-by: Johannes Thumshirn <johannes.thumshirn@men.de>
>>>
>> Acked-by: Jonathan Cameron <jic23@kernel.org>
>>
>> Or I can pick this up after the merge window has closed if Greg hasn't
>> already taken it.
>>
>> Jonathan
>
> Did someone actually take this patch, or was it somehow lost?
>
I've picked it up now and applied it to the fixes-togreg branch of iio.git

Thanks for pointing out I'd forgotten it and sorry about that. I've also
marked it for stable.

> Johannes
>


  reply	other threads:[~2014-06-14 15:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  8:33 [patch] iio: adc: checking for NULL instead of IS_ERR() in probe Dan Carpenter
2014-03-28  8:33 ` Dan Carpenter
2014-03-28 14:07 ` johannes thumshirn
2014-03-28 14:07   ` johannes thumshirn
2014-03-29  9:58   ` Jonathan Cameron
2014-03-29  9:58     ` Jonathan Cameron
2014-06-12 18:44     ` Johannes Thumshirn
2014-06-12 18:44       ` Johannes Thumshirn
2014-06-14 15:17       ` Jonathan Cameron [this message]
2014-06-14 15:17         ` Jonathan Cameron
2014-06-15 15:23         ` Johannes Thumshirn
2014-06-15 15:23           ` Johannes Thumshirn

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=539C6783.4060607@kernel.org \
    --to=jic23@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=morbidrsa@gmail.com \
    /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.