Re: [PATCH v4 4/5] mikrobus: Add mikroBUS driver

From: Markus Elfring
Date: Mon Mar 18 2024 - 13:36:58 EST



> +++ b/drivers/misc/mikrobus/mikrobus_core.c

> +static int mikrobus_pinctrl_select(struct mikrobus_port *port,
> + const char *pinctrl_selected)
> +{
> + struct pinctrl_state *state;
> + int ret;
> +
> + state = pinctrl_lookup_state(port->pinctrl, pinctrl_selected);
> + if (IS_ERR(state)) {
> + return dev_err_probe(&port->dev, PTR_ERR(state),
> + "failed to find state %s",
> + pinctrl_selected);
> + }


I suggest to reconsider the need for extra curly brackets here.

See also:
Section “3) Placing Braces and Spaces”
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.8#n197


Regards,
Markus