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: <877d9dx98p.wl-kuninori.morimoto.gx@renesas.com>
Date:   Wed, 2 Mar 2022 04:35:02 +0000
From:   Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To:     Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc:     broonie@...nel.org, lgirdwood@...il.com, perex@...ex.cz,
        tiwai@...e.com, ast@...nel.org, daniel@...earbox.net,
        andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com,
        john.fastabend@...il.com, kpsingh@...nel.org, f.suligoi@...m.it,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH v2] ASoC: fsi: Add check for clk_enable


Hi Jiasheng

Thank you for your patch

> As the potential failure of the clk_enable(),
> it should be better to check it and return error
> if fails.
> 
> Fixes: ab6f6d85210c ("ASoC: fsi: add master clock control functions")
> Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
(snip)
> +		if (ret)
> +			goto err;
> +		ret = clk_enable(clock->ick);
> +		if (ret)
> +			goto disable_xck;
> +		ret = clk_enable(clock->div);
> +		if (ret)
> +			goto disable_ick;
>
>  		clock->count++;
>  	}
>  
>  	return ret;
> +
> +disable_xck:
> +	clk_disable(clock->xck);
> +disable_ick:
> +	clk_disable(clock->ick);
> +err:
> +	return ret;
>  }

I think disable_ick() / disable_xck() order are inverted ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto

Powered by blists - more mailing lists