public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: rogerq@ti•com (Roger Quadros)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v5 1/8] usb: phy: omap-control: Get rid of platform data
Date: Wed, 21 Aug 2013 09:46:29 +0300	[thread overview]
Message-ID: <52146245.6020904@ti.com> (raw)
In-Reply-To: <593AEF6C47F46446852B067021A273D6D982D30B@MUCSE039.lantiq.com>

Hi Thomas,

On 08/20/2013 06:04 PM, thomas.langer at lantiq.com wrote:
> Hello Roger,
> 
> this will not work!
> 
> Roger Quadros wrote on 2013-08-20:
> 
>> -	struct omap_control_usb_platform_data *pdata =
>> -			dev_get_platdata(&pdev->dev);
>> +
>> +	if (np) {
>> +		of_property_read_u32(np, "ti,type", &control_usb->type);
> 
> here you are dereferencing control_usb
> 
>> +	} else {
>> +		/* We only support DT boot */
>> +		return -EINVAL;
>> +	}
>>
>>  	control_usb = devm_kzalloc(&pdev->dev, sizeof(*control_usb),
>>  		GFP_KERNEL);
> 
> and here it is allocated!

Good catch :).
The problem is eliminated by other patches in this series, so tests ran fine.
But I'll fix this one.

cheers,
-roger

  reply	other threads:[~2013-08-21  6:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 14:56 [PATCH v5 0/8] phy: omap-usb: Support multiple instances and new types Roger Quadros
2013-08-20 14:56 ` [PATCH v5 1/8] usb: phy: omap-control: Get rid of platform data Roger Quadros
2013-08-20 15:04   ` thomas.langer at lantiq.com
2013-08-21  6:46     ` Roger Quadros [this message]
2013-08-20 14:56 ` [PATCH v5 2/8] usb: phy: omap: Add new device types and remove omap_control_usb3_phy_power() Roger Quadros
2013-08-20 14:56 ` [PATCH v5 3/8] usb: phy: omap-usb2: Don't use omap_get_control_dev() Roger Quadros
2013-08-20 14:56 ` [PATCH v5 4/8] usb: phy: omap-usb3: " Roger Quadros
2013-08-20 14:56 ` [PATCH v5 5/8] usb: musb: omap2430: " Roger Quadros
2013-08-20 17:57   ` Sergei Shtylyov
2013-08-21  6:41     ` Roger Quadros
2013-08-20 14:56 ` [PATCH v5 6/8] usb: phy: omap: get rid of omap_get_control_dev() Roger Quadros
2013-08-20 14:56 ` [PATCH v5 7/8] ARM: dts: omap4: update omap-control-usb nodes Roger Quadros
2013-08-20 14:56 ` [PATCH v5 8/8] ARM: dts: omap5: update omap-control-usb node Roger Quadros

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=52146245.6020904@ti.com \
    --to=rogerq@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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