Re: [PATCH] Infineon TPM: IO-port leakage fix, WTX-bugfix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 15 Feb 2006 14:43:47 +0100 Marcel Selhorst wrote:

> Dear all,
> 
> this patch fixes IO-port leakage from request_region in case of error during TPM
> initialization, adds more pnp-verification and fixes a WTX-bug.
> 
> Best regards,
> Marcel Selhorst
> 
> Signed-off-by: Marcel Selhorst <[email protected]>
> ---
> 
> --- linux-2.6.16-rc2/drivers/char/tpm/tpm_infineon.c.old	2006-02-08
> 11:45:09.000000000 +0100

Those 2 lines ^^^^^ should have been one line.  Email client strikes again.

> +++ linux-2.6.16-rc2/drivers/char/tpm/tpm_infineon.c	2006-02-15 13:32:00.000000000 +0100
> @@ -471,14 +484,21 @@ static int __devinit tpm_inf_pnp_probe(s
> 
>  		rc = tpm_register_hardware(&dev->dev, &tpm_inf);
>  		if (rc < 0) {
> -			release_region(tpm_inf.base, TPM_INF_PORT_LEN);
> -			return -ENODEV;
> +			rc = -ENODEV;
> +			goto err_release_region;
>  		}
>  		return 0;
>  	} else {
> -		dev_info(&dev->dev, "No Infineon TPM found!\n");
> -		return -ENODEV;
> +		rc = -ENODEV;
> +		goto err_release_region;
>  	}
> +
> +err_release_region:
> +release_region(tpm_inf.base, TPM_INF_PORT_LEN);
> +release_region(TPM_INF_ADDR, TPM_INF_ADDR_LEN);
> +
> +err_last:
> +return rc;
>  }

The release_region() calls and return should be indented one tab stop.
(email client again??)

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux