linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [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@iolanthe.rowland.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@rowland.harvard.edu>

Thanks & Regards,

Hans

  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
2014-01-13 22:45 ` [PATCH v5 1/2] ohci-platform: Add support for devicetree instantiation Hans de Goede
2014-01-14 19:08   ` Alan Stern
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
2014-01-14  4:12   ` Tony Prisk
2014-01-14  8:44     ` [linux-sunxi] " 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@redhat.com \
    --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 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).