Re: [PATCH] mtd: orion_nand: fix error code path in probe

Michael Opdenacker
2014-10-16T05:06:35Z

On 10/14/2014 11:35 PM, Andrew Lunn wrote:
>
>
> if (pdev->dev.of_node) {
> board = devm_kzalloc(&pdev->dev, sizeof(struct orion_nand_data),
> GFP_KERNEL);
> if (!board) {
> - ret = -ENOMEM;
> - goto no_res;
> + return -ENOMEM;
> }
> Doesn't this now break the coding style? No need to have the {} since
> it is a single statement.

Right, I've checked Documentation/CodingStyle, and this is just
recommended, not absolutely required. That could be the reason why
check_patch.pl didn't complain.

My v2 changes this.

Thanks!

Michael.

--
Michael Opdenacker, CEO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
+33 484 258 098