Re: [PATCH v2] drivers: code cleanups

From: Oliver Neukum
Date: Wed Jul 14 2010 - 06:03:38 EST


Am Mittwoch, 14. Juli 2010, 11:42:56 schrieb Changli Gao:
> drivers: code cleanups
>
> the first three goto clauses caused kfree(NULL), and the error code returned
> by kset->uevent_ops->uevent() wasn't passed to the caller of show_uevent().
> This patch also eliminates the unnecessary initializations of env and count.

This is not a good idea.
If you are indeed fixing a bug of not returning an error, make a patch that does that.
The other parts of your patch really are no improvement, because they make
things harder to maintain if additional cleanups or locking must ever be added.

Regards
Oliver
--
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/