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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <947a2a5d-5a63-6437-bfc3-a5c4841152c2@linux.intel.com>
Date:   Fri, 12 May 2023 13:12:28 +0300
From:   Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        pierre-louis.bossart@...ux.intel.com
Cc:     lgirdwood@...il.com, yung-chuan.liao@...ux.intel.com,
        ranjani.sridharan@...ux.intel.com, kai.vehmanen@...ux.intel.com,
        daniel.baluta@....com, broonie@...nel.org, perex@...ex.cz,
        tiwai@...e.com, sound-open-firmware@...a-project.org,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH] ASoC: SOF: topology: Fix missing error code in
 sof_route_load()



On 12/05/2023 05:54, Jiapeng Chong wrote:
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'err'.
>
> sound/soc/sof/topology.c:2060 sof_route_load() warn: missing error
code 'ret'.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Robots don't necessarily understand code...
The cases which this is aiming to fix are the cases when we ignore
things, not failing.

Would it be possible to check the code and understand it before sending
a patch?

Nack.

> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4935
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
>  sound/soc/sof/topology.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
> index d3d536b0a8f5..3ca3a72f1805 100644
> --- a/sound/soc/sof/topology.c
> +++ b/sound/soc/sof/topology.c
> @@ -2045,7 +2045,6 @@ static int sof_route_load(struct
snd_soc_component *scomp, int index,
>  	if (!source_swidget) {
>  		dev_err(scomp->dev, "error: source %s not found\n",
>  			route->source);
> -		ret = -EINVAL;
>  		goto err;
>  	}
>
> @@ -2064,7 +2063,6 @@ static int sof_route_load(struct
snd_soc_component *scomp, int index,
>  	if (!sink_swidget) {
>  		dev_err(scomp->dev, "error: sink %s not found\n",
>  			route->sink);
> -		ret = -EINVAL;
>  		goto err;
>  	}
>
> @@ -2087,6 +2085,8 @@ static int sof_route_load(struct
snd_soc_component *scomp, int index,
>  	return 0;
>  err:
>  	kfree(sroute);
> +	ret = -EINVAL;
> +
>  	return ret;
>  }
>
-- 
Péter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ