On Wed, Jun 29, 2016 at 12:58:49PM +0300, andrew zamansky wrote:
> if irq==0 (actualy invalid value) then error is printed to dmesg after
> trying to register to 0 interrupt 
> 
> ---
>  drivers/char/tpm/tpm_i2c_nuvoton.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c 
> b/drivers/char/tpm/tpm_i2c_nuvoton.c
> index 75a80e466..3081529 100644
> --- a/drivers/char/tpm/tpm_i2c_nuvoton.c
> +++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
> @@ -554,7 +554,9 @@ static int i2c_nuvoton_probe(struct i2c_client *client,
>        *   TPM_INTF_INT_LEVEL_LOW | TPM_INTF_DATA_AVAIL_INT
>        * The IRQ should be set in the i2c_board_info (which is done
>        * automatically in of_i2c_register_devices, for device tree users */
> -     chip->flags |= TPM_CHIP_FLAG_IRQ;
> +     if(chip->flags)
> +             chip->flags |= TPM_CHIP_FLAG_IRQ;
> +
>       priv->irq = client->irq;
>  
>       if (chip->flags & TPM_CHIP_FLAG_IRQ) {
> -- 
> 1.9.1
> 

Reviewed-by: Jarkko Sakkinen <[email protected]>

PS. There's a style error. "if()" should be "if ()". I don't mind fixing
that. Just remember that next time.

/Jarkko

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to