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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e71ba625-ec1e-1adf-9e4c-b65a91562d9c@linux.intel.com>
Date:   Wed, 26 Aug 2020 10:09:19 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Vinod Koul <vkoul@...nel.org>, Mark Brown <broonie@...nel.org>
Cc:     Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, Oder Chiou <oder_chiou@...ltek.com>,
        Shuming Fan <shumingf@...ltek.com>,
        Takashi Iwai <tiwai@...e.de>
Subject: Re: [PATCH 4/4] ASoC: rt715: Fix return check for
 devm_regmap_init_sdw()



On 8/26/20 7:28 AM, Vinod Koul wrote:
> devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on
> failure which should be checked with IS_ERR. Also use PTR_ERR for
> returning error codes.

Do you mind changing these two additional codecs that were missed in 
this series? Thanks!

rt700-sdw.c:	sdw_regmap = devm_regmap_init_sdw(slave, &rt700_sdw_regmap);
rt700-sdw.c-	if (!sdw_regmap)
rt700-sdw.c-		return -EINVAL;

--
rt711-sdw.c:	sdw_regmap = devm_regmap_init_sdw(slave, &rt711_sdw_regmap);
rt711-sdw.c-	if (!sdw_regmap)
rt711-sdw.c-		return -EINVAL;
--

> 
> Reported-by: Takashi Iwai <tiwai@...e.de>
> Fixes: d1ede0641b05 ("ASoC: rt715: add RT715 codec driver")
> Signed-off-by: Vinod Koul <vkoul@...nel.org>
> ---
>   sound/soc/codecs/rt715-sdw.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c
> index d11b23d6b240..68a36739f1b0 100644
> --- a/sound/soc/codecs/rt715-sdw.c
> +++ b/sound/soc/codecs/rt715-sdw.c
> @@ -527,8 +527,8 @@ static int rt715_sdw_probe(struct sdw_slave *slave,
>   
>   	/* Regmap Initialization */
>   	sdw_regmap = devm_regmap_init_sdw(slave, &rt715_sdw_regmap);
> -	if (!sdw_regmap)
> -		return -EINVAL;
> +	if (IS_ERR(sdw_regmap))
> +		return PTR_ERR(sdw_regmap);
>   
>   	regmap = devm_regmap_init(&slave->dev, NULL, &slave->dev,
>   		&rt715_regmap);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ