RE: [PATCH 1/2] gpio: realtek: Add GPIO support for RTD SoC variants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Krzysztof,

>>>> +static int rtd_gpio_probe(struct platform_device *pdev) {
>>>> +     struct rtd_gpio *data;
>>>> +     const struct of_device_id *match;
>>>> +     struct device_node *node;
>>>> +     int ret;
>>>> +     int i;
>>>> +
>>>> +     node = pdev->dev.of_node;
>>>> +     match = of_match_node(rtd_gpio_of_matches, pdev->dev.of_node);
>>>> +     if (!match || !match->data)
>>>> +             return -EINVAL;
>>>> +
>>>> +     data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
>>>> +     if (!data)
>>>> +             return -ENOMEM;
>>>> +
>>>> +     data->assert_irq = irq_of_parse_and_map(node, 0);
>>>> +     if (!data->assert_irq)
>>>> +             goto deferred;
>>>> +
>>>> +     data->deassert_irq = irq_of_parse_and_map(node, 1);
>>>> +     if (!data->deassert_irq)
>>>> +             goto deferred;
>>>
>>> So this goes to cleanup path...
>>>
>>
>> Since there is no need to do devm_free, I will directly return -EPROBE_DEFER
>here.
>
>That's not a correct return value. You do not return DEFER on missing IRQ. This
>should anyway be different call: platform_get_irq().
>

I got it . Thank you for the reminder.

Thanks,
Tzuyi Chang




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux