[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ybx0FouFzlI79zjU@sirena.org.uk>
Date: Fri, 17 Dec 2021 11:27:18 +0000
From: Mark Brown <broonie@...nel.org>
To: Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc: matthias.bgg@...il.com, lgirdwood@...il.com,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] isoc: mediatek: potential use of error pointer
On Fri, Dec 17, 2021 at 02:41:40PM +0800, Jiasheng Jiang wrote:
> clk[i] = devm_clk_get(&pdev->dev, clk_names[i]);
> + if (!clk[i])
> + return -ENOMEM;
The whole point with returning an error pointer is that there's an error
code in there, we should use that rather than overriding it with another
value which might be misleading.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists