Re: [PATCH] regulator: core: Streamline debugfs operations

From: Mark Brown
Date: Tue May 23 2023 - 11:17:58 EST


On Tue, May 23, 2023 at 05:03:58PM +0200, Geert Uytterhoeven wrote:

> - if (!regulator->debugfs) {
> + if (IS_ERR(regulator->debugfs))
> rdev_dbg(rdev, "Failed to create debugfs directory\n");
> - } else {
> - debugfs_create_u32("uA_load", 0444, regulator->debugfs,
> - &regulator->uA_load);
> - }
> +
> + debugfs_create_u32("uA_load", 0444, regulator->debugfs,
> + &regulator->uA_load);

No, it's actually useful to not just dump these files in the root
directory if we fail to create the per regulator directory.

Attachment: signature.asc
Description: PGP signature