From: Johannes Thumshirn <morbidrsa@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
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: Thu, 12 Jun 2014 20:44:21 +0200 [thread overview]
Message-ID: <87lht2q86y.fsf@sauron.localdomain> (raw)
In-Reply-To: <5336995C.90701@kernel.org> (Jonathan Cameron's message of "Sat, 29 Mar 2014 09:58:52 +0000")
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?
Johannes
next prev parent reply other threads:[~2014-06-12 18:44 UTC|newest]
Thread overview: 6+ 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 14:07 ` johannes thumshirn
2014-03-29 9:58 ` Jonathan Cameron
2014-06-12 18:44 ` Johannes Thumshirn [this message]
2014-06-14 15:17 ` Jonathan Cameron
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=87lht2q86y.fsf@sauron.localdomain \
--to=morbidrsa@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-iio@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox