From: Krzysztof Kozlowski <krzk@kernel.org>
To: Qinglang Miao <miaoqinglang@huawei.com>
Cc: linux-samsung-soc@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org, Kukjin Kim <kgene@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next] ARM: s3c: fix return value check in s3c_usb_otgphy_init()
Date: Tue, 28 Jul 2020 14:47:06 +0200 [thread overview]
Message-ID: <20200728124706.GA32233@kozik-lap> (raw)
In-Reply-To: <20200728022756.87687-1-miaoqinglang@huawei.com>
On Tue, Jul 28, 2020 at 10:27:56AM +0800, Qinglang Miao wrote:
> the function clk_get() returns ERR_PTR() in case of error and
> never returns NULL. So there's no need to test whether xusbxti
> is NULL, just remove the redundant part in the return value check.
>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> arch/arm/mach-s3c64xx/setup-usb-phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks good, thanks. I don't plan to take anything before merge window
(it is quite late in the cycle) so I will apply it after the window.
Best regards,
Krzysztof
> diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c
> index d6b0e3b26..99d743884 100644
> --- a/arch/arm/mach-s3c64xx/setup-usb-phy.c
> +++ b/arch/arm/mach-s3c64xx/setup-usb-phy.c
> @@ -31,7 +31,7 @@ static int s3c_usb_otgphy_init(struct platform_device *pdev)
> phyclk = readl(S3C_PHYCLK) & ~S3C_PHYCLK_CLKSEL_MASK;
>
> xusbxti = clk_get(&pdev->dev, "xusbxti");
> - if (xusbxti && !IS_ERR(xusbxti)) {
> + if (!IS_ERR(xusbxti)) {
> switch (clk_get_rate(xusbxti)) {
> case 12 * MHZ:
> phyclk |= S3C_PHYCLK_CLKSEL_12M;
> --
> 2.25.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-28 12:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 2:27 [PATCH -next] ARM: s3c: fix return value check in s3c_usb_otgphy_init() Qinglang Miao
2020-07-28 12:47 ` Krzysztof Kozlowski [this message]
2020-08-17 15:45 ` Krzysztof Kozlowski
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=20200728124706.GA32233@kozik-lap \
--to=krzk@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=miaoqinglang@huawei.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;
as well as URLs for NNTP newsgroup(s).