From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Cc: Tony Prisk <linux-ci5G2KO2hbZ+pU9mqzGVBQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-usb <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH v5 1/2] ohci-platform: Add support for devicetree instantiation
Date: Wed, 15 Jan 2014 16:07:40 +0100 [thread overview]
Message-ID: <52D6A43C.9090706@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1401141404420.1310-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
Hi,
On 01/14/2014 08:08 PM, Alan Stern wrote:
> On Mon, 13 Jan 2014, Hans de Goede wrote:
>
>> Add support for ohci-platform instantiation from devicetree, including
>> optionally getting clks and a phy from devicetree, and enabling / disabling
>> those on power_on / off.
>>
>> This should allow using ohci-platform from devicetree in various cases.
>> Specifically after this commit it can be used for the ohci controller found
>> on Allwinner sunxi SoCs.
>
> This is fine as far as I am concerned, except for one thing.
>
>> @@ -60,17 +127,23 @@ static int ohci_platform_probe(struct platform_device *dev)
>> struct usb_hcd *hcd;
>> struct resource *res_mem;
>> struct usb_ohci_pdata *pdata = dev_get_platdata(&dev->dev);
>> - int irq;
>> - int err = -ENOMEM;
>> -
>> - if (!pdata) {
>> - WARN_ON(1);
>> - return -ENODEV;
>> - }
>> + struct ohci_platform_priv *priv;
>> + int clk, irq, err;
>
> clk isn't initialized to anything...
Good catch, will fix and then do a v6 with this + the issue from your other mail fixed
and I'll add your ack.
>
>> -err_put_hcd:
>> - usb_put_hcd(hcd);
>> err_power:
>> if (pdata->power_off)
>> pdata->power_off(dev);
>> +err_put_clks:
>> + while (--clk >= 0)
>> + clk_put(priv->clks[clk]);
>
> ... but it gets used here. The compiler should have warned about this.
Should have yes, but it doesn't (I've just double checked).
> After fixing that, you can add
>
> Acked-by: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Thanks & Regards,
Hans
next prev parent reply other threads:[~2014-01-15 15:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 22:45 [PATCH v5 0/2] ohci and ehci-platform clks, phy and dt support Hans de Goede
[not found] ` <1389653115-11028-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-13 22:45 ` [PATCH v5 1/2] ohci-platform: Add support for devicetree instantiation Hans de Goede
[not found] ` <1389653115-11028-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-14 19:08 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1401141404420.1310-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-01-15 15:07 ` Hans de Goede [this message]
2014-01-13 22:45 ` [PATCH v5 2/2] ehci-platform: Add support for clks and phy passed through devicetree Hans de Goede
[not found] ` <1389653115-11028-3-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-14 4:12 ` Tony Prisk
[not found] ` <52D4B933.9080505-ci5G2KO2hbZ+pU9mqzGVBQ@public.gmane.org>
2014-01-14 8:44 ` Hans de Goede
2014-01-14 19:18 ` Alan Stern
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=52D6A43C.9090706@redhat.com \
--to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-ci5G2KO2hbZ+pU9mqzGVBQ@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@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).