x86, mce, AMD: Fix leaving freed data in a list

Author: Julia Lawall <julia@diku.dk>

b may be added to a list, but is not removed before being freed
in the case of an error.  This is done in the corresponding
deallocation function, so the code here has been changed to
follow that.

The sematic match that finds this problem is as follows:

expression E,E1,E2;
identifier l;

... when != E1
    when != list_del(&E->l)
    when != list_del_init(&E->l)
    when != E = E2

Signed-off-by: Julia Lawall 
Cc: Borislav Petkov 
Cc: Robert Richter 
Cc: Yinghai Lu 
Cc: Andreas Herrmann 
Link: http://lkml.kernel.org/r/1305294731-12127-1-git-send-email-julia@diku.dk
Signed-off-by: Ingo Molnar 
 arch/x86/kernel/cpu/mcheck/mce_amd.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index 167f97b..bb0adad 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -509,6 +509,7 @@ recurse:
 	if (b) {
+		list_del(&b->miscj);
 	return err;