Re: [PATCH 1/1] x86: Fix mcheck_init_device() to handlemisc_register() correctly

From: Dan Carpenter
Date: Fri Mar 04 2011 - 13:25:42 EST


On Fri, Mar 04, 2011 at 01:29:27PM +0000, J.P. Lacerda wrote:
> The return value for misc_register() was not being taken into account.
> Furthermore, if misc_register() fails, we must rollback any changes made by
> mcheck_init_device()
>
> Signed-off-by: J.P. Lacerda <jp.lacerda@xxxxxxxxxxxxxxx>

Ah... You found a bug that Johan missed in his original patch. But you
still left out the case where mce_create_device() can fail which his
patch addressed. Also his patch was nicer; using gotos to unwind is
the standard way for kernel error handling.

Also why did you poach his patch without giving any kind of credit,
instead of just telling him about the bug??? WTF?

Johan, please fix add a free_cpumask_var(mce_dev_initialized); to your
patch. Call it [PATCH v2]. Add in the changelog that J.P. Lacerda
told you about the missing free_cpumask_var(mce_dev_initialized).

regards,
dan carpenter


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