From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mt76: Fix an IS_ERR() vs NULL check in mt76_wmac_probe()
Date: Wed, 06 Mar 2019 10:50:11 +0200 [thread overview]
Message-ID: <875zswfku4.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20190306072633.GA2625@kadam> (Dan Carpenter's message of "Wed, 6 Mar 2019 10:26:33 +0300")
Dan Carpenter <dan.carpenter@oracle.com> writes:
> The devm_ioremap_resource() function never returns NULL, it returns
> error pointers.
>
> Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7603/soc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/soc.c b/drivers/net/wireless/mediatek/mt76/mt7603/soc.c
> index e13fea80d970..b920be1f5718 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7603/soc.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7603/soc.c
> @@ -23,9 +23,9 @@ mt76_wmac_probe(struct platform_device *pdev)
> }
>
> mem_base = devm_ioremap_resource(&pdev->dev, res);
> - if (!mem_base) {
> + if (IS_ERR(mem_base)) {
> dev_err(&pdev->dev, "Failed to get memory resource\n");
> - return -EINVAL;
> + return PTR_ERR(mem_base);
> }
Wei already posted an identical patch:
https://patchwork.kernel.org/patch/10837285/
--
Kalle Valo
prev parent reply other threads:[~2019-03-06 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 7:26 [PATCH] mt76: Fix an IS_ERR() vs NULL check in mt76_wmac_probe() Dan Carpenter
2019-03-06 8:50 ` Kalle Valo [this message]
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=875zswfku4.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
/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