From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] pwm: vt8500: Update vt8500 PWM driver support
Date: Fri, 26 Oct 2012 21:11:56 +0000 [thread overview]
Message-ID: <201210262111.56608.arnd@arndb.de> (raw)
In-Reply-To: <4EE5B48738DDED408878C97C8E050A8B1BD17DD2@SJEXCHMB05.corp.ad.broadcom.com>
On Friday 26 October 2012, Chris Brand wrote:
> > @@ -124,6 +156,12 @@ static int __devinit pwm_probe(struct
> > platform_device *pdev)
> > chip->chip.base = -1;
> > chip->chip.npwm = VT8500_NR_PWMS;
> >
> > + chip->clk = devm_clk_get(&pdev->dev, NULL);
> > + if (IS_ERR_OR_NULL(chip->clk)) {
> > + dev_err(&pdev->dev, "clock source not specified\n");
> > + return PTR_ERR(chip->clk);
> > + }
> > +
>
> Do you want IS_ERR() rather than IS_ERR_OR_NULL() here ?
> Otherwise you may return PTR_ERR(NULL).
>
Right. devm_clk_get() never returns NULL, but as Russell pointed out
recently, this usage of IS_ERR_OR_NULL() is completely bogus.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: "Chris Brand" <chris.brand@broadcom.com>
Cc: "Tony Prisk" <linux@prisktech.co.nz>,
"thierry.reding@avionic-design.de"
<thierry.reding@avionic-design.de>,
"arm@kernel.org" <arm@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4] pwm: vt8500: Update vt8500 PWM driver support
Date: Fri, 26 Oct 2012 21:11:56 +0000 [thread overview]
Message-ID: <201210262111.56608.arnd@arndb.de> (raw)
In-Reply-To: <4EE5B48738DDED408878C97C8E050A8B1BD17DD2@SJEXCHMB05.corp.ad.broadcom.com>
On Friday 26 October 2012, Chris Brand wrote:
> > @@ -124,6 +156,12 @@ static int __devinit pwm_probe(struct
> > platform_device *pdev)
> > chip->chip.base = -1;
> > chip->chip.npwm = VT8500_NR_PWMS;
> >
> > + chip->clk = devm_clk_get(&pdev->dev, NULL);
> > + if (IS_ERR_OR_NULL(chip->clk)) {
> > + dev_err(&pdev->dev, "clock source not specified\n");
> > + return PTR_ERR(chip->clk);
> > + }
> > +
>
> Do you want IS_ERR() rather than IS_ERR_OR_NULL() here ?
> Otherwise you may return PTR_ERR(NULL).
>
Right. devm_clk_get() never returns NULL, but as Russell pointed out
recently, this usage of IS_ERR_OR_NULL() is completely bogus.
Arnd
next prev parent reply other threads:[~2012-10-26 21:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 17:38 [PATCH v4] pwm: vt8500: Update vt8500 PWM driver support Tony Prisk
2012-10-24 17:38 ` Tony Prisk
2012-10-25 14:21 ` Arnd Bergmann
2012-10-25 14:21 ` Arnd Bergmann
2012-10-26 20:52 ` Chris Brand
2012-10-26 20:52 ` Chris Brand
2012-10-26 21:11 ` Arnd Bergmann [this message]
2012-10-26 21:11 ` Arnd Bergmann
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=201210262111.56608.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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.