[PATCH] isoc: mediatek: potential use of error pointer
Mark Brown
broonie at kernel.org
Fri Dec 17 03:27:18 PST 2021
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211217/2688d310/attachment.sig>
More information about the linux-arm-kernel
mailing list