]> git.baikalelectronics.ru Git - kernel.git/commit
tpm/tpm_crb: fix priv->cmd_size initialisation
authorManuel Lauss <manuel.lauss@gmail.com>
Mon, 19 Jun 2017 06:27:17 +0000 (08:27 +0200)
committerJames Morris <james.l.morris@oracle.com>
Thu, 6 Jul 2017 23:49:25 +0000 (09:49 +1000)
commitbf361bd0ec8bd780e6a9333ad6aa48b96ca13e0f
treea7595923697af1ebe69de071052689102ffb59bb
parentdbf8173d8ad46984b7a68acafd9e6abd487ced29
tpm/tpm_crb: fix priv->cmd_size initialisation

priv->cmd_size is never initialised if the cmd and rsp buffers reside
at different addresses.  Initialise it in the exit path of the function
when rsp buffer has also been successfully allocated.

Fixes: a8af3f3821f5 ("tpm/tpm_crb: cache cmd_size register value.").
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
drivers/char/tpm/tpm_crb.c