From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: 'Praveen Paneri'
<p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] usb: phy: samsung: Introducing usb phy driver for hsotg
Date: Wed, 17 Oct 2012 20:13:01 +0100 [thread overview]
Message-ID: <20121017191300.GL21164@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <005801cdac56$8da0c120$a8e24360$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
On Wed, Oct 17, 2012 at 08:00:00PM +0900, Kukjin Kim wrote:
> > +static int samsung_usbphy_get_refclk_freq(struct samsung_usbphy *sphy)
> > +{
> > + struct clk *ref_clk;
> > + int refclk_freq = 0;
> > +
> > + ref_clk = clk_get(sphy->dev, "xusbxti");
> > + if (IS_ERR(ref_clk)) {
>
> IS_ERR_OR_NULL(ref_clk)?
For the N'th time, NO. IS_ERR is correct here.
> > + dev_err(sphy->dev, "Failed to get reference clock\n");
> > + return PTR_ERR(ref_clk);
Look, it's the ABI. Not only that but it's also TOTALLY AND UTTERLY WRONG
to use IS_ERR_OR_NULL(foo) and then follow it with return PTR_ERR(foo).
You end up returning ZERO.
Stop telling people to use IS_ERR_OR_NULL without properly thinking about
it first. Virtually every single one of these done this way is a BUG.
Are we clear on this?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-10-17 19:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 12:54 [PATCH v6 0/5] usb: phy: samsung: Introducing usb phy driver for samsung SoCs Praveen Paneri
2012-09-17 12:54 ` [PATCH v6 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg Praveen Paneri
2012-09-24 10:41 ` Kyungmin Park
[not found] ` <1347886484-16064-2-git-send-email-p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-09-24 9:38 ` Praveen Paneri
2012-09-24 10:39 ` ABRAHAM, KISHON VIJAY
[not found] ` <CAD6zSYP0seNbwYB1VMLBH++gXKs3ZkJg-ztx6_2263OxPn7M6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-25 11:29 ` Marc Kleine-Budde
[not found] ` <50619595.4010304-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-09-26 7:22 ` Praveen Paneri
[not found] ` <CAD6zSYOCJ2wV82-oeX5xo2COMKMQMsPfgeesPhq+Ui_3_PU5ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-03 9:26 ` [PATCH " Praveen Paneri
2012-10-12 10:15 ` [PATCH] " Praveen Paneri
[not found] ` <1350036934-6051-1-git-send-email-p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-15 13:28 ` Felipe Balbi
2012-10-15 13:44 ` Kyungmin Park
[not found] ` <20121015132836.GT24333-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-10-16 5:39 ` Praveen Paneri
2012-10-20 19:19 ` Pavel Machek
2012-10-22 5:43 ` Praveen Paneri
2012-10-17 11:00 ` Kukjin Kim
2012-10-17 12:30 ` Praveen Paneri
[not found] ` <005801cdac56$8da0c120$a8e24360$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-17 19:13 ` Russell King - ARM Linux [this message]
2012-10-21 7:16 ` Domenico Andreoli
2012-09-24 13:04 ` [PATCH v6 1/5] " Rob Herring
[not found] ` <50605A69.2070201-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-09-25 11:23 ` Praveen Paneri
2012-09-25 12:18 ` Rob Herring
2012-09-25 13:17 ` ABRAHAM, KISHON VIJAY
2012-09-26 7:14 ` Praveen Paneri
[not found] ` <1347886484-16064-1-git-send-email-p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-09-17 12:54 ` [PATCH v6 2/5] usb: s3c-hsotg: Adding phy driver support Praveen Paneri
2012-09-17 12:54 ` [PATCH v6 3/5] ARM: S3C64XX: Removing old phy setup code Praveen Paneri
2012-09-17 12:54 ` [PATCH v6 4/5] ARM: S3C64XX: Enabling samsung-usbphy driver Praveen Paneri
2012-09-17 12:54 ` [PATCH v6 5/5] ARM: Exynos4210: " Praveen Paneri
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=20121017191300.GL21164@n2100.arm.linux.org.uk \
--to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=l.majewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=p.paneri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@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 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).