From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "TY_Chang[張子逸]" <tychang@realtek.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] gpio: realtek: Add GPIO support for RTD SoC variants
Date: Thu, 2 Nov 2023 08:11:51 +0100 [thread overview]
Message-ID: <4fc3fafa-6c9b-440a-99fe-1332cd3d5b1d@linaro.org> (raw)
In-Reply-To: <8e4c8676acaf4ba6bf3f57451b2eab40@realtek.com>
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
next prev parent reply other threads:[~2023-11-02 7:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 2:58 [PATCH 0/2] Add gpio driver support for Realtek DHC SoCs Tzuyi Chang
2023-11-01 2:58 ` [PATCH 1/2] gpio: realtek: Add GPIO support for RTD SoC variants Tzuyi Chang
2023-11-01 7:15 ` Krzysztof Kozlowski
2023-11-02 3:30 ` TY_Chang[張子逸]
2023-11-02 7:11 ` Krzysztof Kozlowski [this message]
2023-11-03 9:09 ` TY_Chang[張子逸]
2023-11-01 8:39 ` Linus Walleij
2023-11-02 12:40 ` TY_Chang[張子逸]
2023-11-02 14:52 ` Linus Walleij
2023-11-01 2:58 ` [PATCH 2/2] dt-bindings: gpio: realtek: Add realtek,rtd-gpio bindings Tzuyi Chang
2023-11-01 7:13 ` Krzysztof Kozlowski
2023-11-02 3:11 ` TY_Chang[張子逸]
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=4fc3fafa-6c9b-440a-99fe-1332cd3d5b1d@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=tychang@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®