[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tpmdd-devel
Subject:    Re: [tpmdd-devel] [PATCH] Properly clean sysfs entries in error path
From:       Jason Gunthorpe <jgunthorpe () obsidianresearch ! com>
Date:       2014-06-19 19:25:18
Message-ID: 20140619192518.GA16990 () obsidianresearch ! com
[Download RAW message or body]

On Thu, Jun 19, 2014 at 03:00:19PM -0400, Stefan Berger wrote:
> Properly clean the sysfs entries in the error path
> 
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

>  drivers/char/tpm/tpm-interface.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index 62e10fd..d175fb8 100644
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -1095,7 +1095,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev,
>  		goto del_misc;
>  
>  	if (tpm_add_ppi(&dev->kobj))
> -		goto del_misc;
> +		goto del_sysfs;
>  
>  	chip->bios_dir = tpm_bios_log_setup(chip->devname);
>  
> @@ -1106,6 +1106,8 @@ struct tpm_chip *tpm_register_hardware(struct device *dev,
>  
>  	return chip;
>  
> +del_sysfs:
> +	tpm_sysfs_del_device(chip);
>  del_misc:
>  	tpm_dev_del_device(chip);
>  put_device:

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic