Re: [PATCH 1/2 v3] pinctrl: make a copy of pinmux map

From: Linus Walleij
Date: Wed Nov 30 2011 - 10:23:00 EST


On Wed, Nov 30, 2011 at 2:30 PM, Arnd Bergmann <arnd.bergmann@xxxxxxxxxx> wrote:

> Reviewed-by: Arnd Bergmann <arnd@xxxxxxxxxx>

Thanks!

>> +     int ret = 0;
(...)
>
> A trick pointed out by Rusty Russell in a recent blog post [1] is to
> not initialize the return value initially, but always set it only
> in the error path so that the compiler can warn you when you ever
> forget setting it in one path.

Clever! I do away with ret altogether in the next patch though,
so I'll remember this another time. Maybe even something for
checkpatch to react on...

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/