On 01/15/15 at 11:21am, Dan Carpenter wrote: > The "> 0" should be ">= 0" so that we free the last entry. > ditto as the another patch, i=0 case has been handled in previous code so it is not necessary to do it under goto label. > Fixes: 5039e316dde3 ('x86: Export x86 boot_params to sysfs') > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > > diff --git a/arch/x86/kernel/ksysfs.c b/arch/x86/kernel/ksysfs.c > index c2bedae..b0cfb64 100644 > --- a/arch/x86/kernel/ksysfs.c > +++ b/arch/x86/kernel/ksysfs.c > @@ -299,7 +299,7 @@ static int __init create_setup_data_nodes(struct kobject *parent) > return 0; > > out_clean_nodes: > - for (j = i - 1; j > 0; j--) > + for (j = i - 1; j >= 0; j--) > cleanup_setup_data_node(*(kobjp + j)); > kfree(kobjp); > out_setup_data_kobj: -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html