Re: linux-5.4-rc8/drivers/char/tpm/tpm1-cmd.c:735: possible missing return value check

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

 



On Mon, Nov 18, 2019 at 09:24:32AM +0000, David Binderman wrote:
> Hello there,
> 
> linux-5.4-rc8/drivers/char/tpm/tpm1-cmd.c:735:5: style: Variable 'rc' is reassigned a value before the old one has been used. [redundantAssignment]
> 
> Source code is
> 
>     if (tpm_suspend_pcr)
>         rc = tpm1_pcr_extend(chip, tpm_suspend_pcr, dummy_hash,
>                      "extending dummy pcr before suspend");
> 
>     rc = tpm_buf_init(&buf, TPM_TAG_RQU_COMMAND, TPM_ORD_SAVESTATE);
> 
> Suggest add test of rc after call to tpm1_pcr_extend.

Great, how about you submit a patch to resolve this?  That way you can
get the full credit for finding and resolveing the issue?

thanks,

greg k-h



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux