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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4fc3fafa-6c9b-440a-99fe-1332cd3d5b1d@linaro.org>
Date:   Thu, 2 Nov 2023 08:11:51 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     TY_Chang[張子逸] <tychang@...ltek.com>,
        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

On 02/11/2023 04:30, TY_Chang[張子逸] wrote:
> Hi Krzysztof,
> 
>> On 01/11/2023 03:58, Tzuyi Chang wrote:
>>> This commit adds GPIO support for Realtek DHC RTD SoCs.
>>
>> Please do not use "This commit/patch", but imperative mood. See longer
>> explanation here:
>> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-
>> patches.rst#L95
>>
> 
> I will remove these words.
> 
>>> +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().


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ