Skip to content

Commit 9d75f08

Browse files
Hon Ching \(Vicky\) LoPeterHuewe
authored andcommitted
vTPM: set virtual device before passing to ibmvtpm_reset_crq
tpm_ibmvtpm_probe() calls ibmvtpm_reset_crq(ibmvtpm) without having yet set the virtual device in the ibmvtpm structure. So in ibmvtpm_reset_crq, the phype call contains empty unit addresses, ibmvtpm->vdev->unit_address. Signed-off-by: Hon Ching(Vicky) Lo <[email protected]> Signed-off-by: Joy Latten <[email protected]> Reviewed-by: Ashley Lai <[email protected]> Cc: <[email protected]> Fixes: 132f762 ("drivers/char/tpm: Add new device driver to support IBM vTPM") Signed-off-by: Peter Huewe <[email protected]>
1 parent 84e3b42 commit 9d75f08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/char/tpm/tpm_ibmvtpm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
578578
goto cleanup;
579579
}
580580

581+
ibmvtpm->dev = dev;
582+
ibmvtpm->vdev = vio_dev;
583+
581584
crq_q = &ibmvtpm->crq_queue;
582585
crq_q->crq_addr = (struct ibmvtpm_crq *)get_zeroed_page(GFP_KERNEL);
583586
if (!crq_q->crq_addr) {
@@ -622,8 +625,6 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
622625

623626
crq_q->index = 0;
624627

625-
ibmvtpm->dev = dev;
626-
ibmvtpm->vdev = vio_dev;
627628
TPM_VPRIV(chip) = (void *)ibmvtpm;
628629

629630
spin_lock_init(&ibmvtpm->rtce_lock);

0 commit comments

Comments
 (0)