Re: [PATCH v2 1/2] regulator: core: Fix more error checking for debugfs_create_dir()

From: Mark Brown
Date: Thu May 25 2023 - 06:33:37 EST


On Wed, May 24, 2023 at 02:22:17PM +0200, Geert Uytterhoeven wrote:
> In case of failure, debugfs_create_dir() does not return NULL, but an
> error pointer. Most incorrect error checks were fixed, but the one in
> create_regulator() was forgotten.

This breaks the build:

/build/stage/linux/drivers/regulator/core.c:1916:11: error: expected identifier
or ‘(’ before ‘else’
1916 | } else {
| ^~~~
/build/stage/linux/drivers/regulator/core.c:1933:9: error: expected identifier o
r ‘(’ before ‘if’
1933 | if (!regulator_ops_is_valid(rdev, REGULATOR_CHANGE_STATUS) &&
| ^~
/build/stage/linux/drivers/regulator/core.c:1937:9: error: expected identifier o
r ‘(’ before ‘return’
1937 | return regulator;
| ^~~~~~
/build/stage/linux/drivers/regulator/core.c:1938:1: error: expected identifier or ‘(’ before ‘}’ token
1938 | }
| ^

Attachment: signature.asc
Description: PGP signature