Re: [PATCH] isoc: mediatek: potential use of error pointer

From: Mark Brown
Date: Fri Dec 17 2021 - 06:27:26 EST


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.

Attachment: signature.asc
Description: PGP signature