lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c29e820575ba4c7fb833e960497f59cf@realtek.com>
Date:   Fri, 3 Nov 2023 09:09:35 +0000
From:   TY_Chang[張子逸] <tychang@...ltek.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        "Andy Shevchenko" <andy@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>
CC:     "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/2] gpio: realtek: Add GPIO support for RTD SoC variants

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ