[PATCH 04/10] ARM: OMAP: omap_device: register to the per-device PM QoS framework

Menon, Nishanth nm at ti.com
Thu Jul 19 05:21:29 EDT 2012


On Wed, Jun 20, 2012 at 5:41 AM, Rajendra Nayak <rnayak at ti.com> wrote:
>>
>> +       /* Look for the platform device for the constraint target device
>> */
>> +       pdev = to_platform_device(dev_pm_qos_req->dev);
>> +
>> +       /* Try to catch non platform devices */
>> +       if (pdev->name == NULL) {
>
>
> Is this a safe way to catch non platform devices?

in addition, we should check !pdev before attempting to dereference
and check for pdev->name

Regards,
Nishanth Menon



More information about the linux-arm-kernel mailing list