lkml.org 
[lkml]   [2006]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] firmware/efivars: handle error

On Tue, Oct 10, 2006 at 09:19:49AM -0400, Jeff Garzik wrote:
>
>
> Signed-off-by: Jeff Garzik <jeff@garzik.org>
>
> ---
>
> drivers/firmware/efivars.c | 7 ++++++-
>
> diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
> index 8ebce1c..5ab5e39 100644
> --- a/drivers/firmware/efivars.c
> +++ b/drivers/firmware/efivars.c
> @@ -639,7 +639,12 @@ efivar_create_sysfs_entry(unsigned long
>
> kobject_set_name(&new_efivar->kobj, "%s", short_name);
> kobj_set_kset_s(new_efivar, vars_subsys);
> - kobject_register(&new_efivar->kobj);
> + i = kobject_register(&new_efivar->kobj);
> + if (i) {
> + kfree(short_name);
> + kfree(new_efivar);
> + return 1;
> + }
>
> kfree(short_name);
> short_name = NULL;


Acked-by: Matt Domsch <Matt_Domsch@dell.com>

Thanks Jeff!

--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-10 15:33    [W:0.032 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site