All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Mukunda,Vijendar via Alsa-devel" <alsa-devel@alsa-project.org>
To: Dan Carpenter <error27@gmail.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] soundwire: amd: fix an IS_ERR() vs NULL bug
Date: Thu, 6 Apr 2023 17:32:21 +0530	[thread overview]
Message-ID: <168078236161.26.10650504199419445308@mailman-core.alsa-project.org> (raw)
In-Reply-To: <3be30516-a1b0-412b-8379-06011855e46f@kili.mountain>


[-- Attachment #0: Type: message/rfc822, Size: 11504 bytes --]

From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Sanyog Kale <sanyog.r.kale@intel.com>, alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] soundwire: amd: fix an IS_ERR() vs NULL bug
Date: Thu, 6 Apr 2023 17:32:21 +0530
Message-ID: <701bef7f-77bb-63a6-429f-1293519a6b21@amd.com>

On 06/04/23 14:26, Dan Carpenter wrote:
> The devm_ioremap() function returns NULL on error.  It never returns
> error pointers.  Update the error checking accordingly.
>
> Fixes: a673a8dfc214 ("soundwire: amd: Add support for AMD Manager driver")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
>  drivers/soundwire/amd_manager.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
> index 9fb7f91ca182..9bb8ae8c5f32 100644
> --- a/drivers/soundwire/amd_manager.c
> +++ b/drivers/soundwire/amd_manager.c
> @@ -910,9 +910,9 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	amd_manager->acp_mmio = devm_ioremap(dev, res->start, resource_size(res));
> -	if (IS_ERR(amd_manager->mmio)) {
> +	if (!amd_manager->mmio) {
This will break the functionality.  Condition should be
if (!amd_manager->acp_mmio)

>  		dev_err(dev, "mmio not found\n");
> -		return PTR_ERR(amd_manager->mmio);
> +		return -ENOMEM;
>  	}
>  	amd_manager->instance = pdata->instance;
>  	amd_manager->mmio = amd_manager->acp_mmio +


  reply	other threads:[~2023-04-06 12:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  8:56 [PATCH] soundwire: amd: fix an IS_ERR() vs NULL bug Dan Carpenter
2023-04-06 12:02 ` Mukunda,Vijendar via Alsa-devel [this message]
2023-04-06 12:02 ` Mukunda,Vijendar
2023-04-06 12:17   ` Dan Carpenter

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=168078236161.26.10650504199419445308@mailman-core.alsa-project.org \
    --to=alsa-devel@alsa-project.org \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=vijendar.mukunda@amd.com \
    --cc=yung-chuan.liao@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.