Re: [PATCH] ASoc: PCM6240: Fix a null pointer dereference in pcmdevice_i2c_probe
From: Markus Elfring
Date: Sat Jun 15 2024 - 02:22:52 EST
…
> +++ b/sound/soc/codecs/pcm6240.c
> @@ -2088,8 +2088,7 @@ static int pcmdevice_i2c_probe(struct i2c_client *i2c)
>
> pcm_dev = devm_kzalloc(&i2c->dev, sizeof(*pcm_dev), GFP_KERNEL);
> if (!pcm_dev) {
> - ret = -ENOMEM;
> - goto out;
> + return -ENOMEM;
> }
…
Would you like to omit curly brackets from a single if branch?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.10-rc3#n197
Regards,
Markus