tpm: ibmvtpm: fix error return code in tpm_ibmvtpm_probe()
Subsystems (3)
PATCH 1/1 tpm: ibmvtpm: fix error return code in tpm_ibmvtpm_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
--- drivers/char/tpm/tpm_ibmvtpm.c | 1 + 1 file changed, 1 insertion(+)
drivers/char/tpm/tpm_ibmvtpm.c +1 -0
@@ -687,6 +687,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev, ibmvtpm->rtce_buf != NULL, HZ)) {dev_err (dev,"CRQ response timed out\n" ); + rc = -ETIMEDOUT ; goto init_irq_cleanup; }
Signature · 1 line
2.17.1
Quoted 15 lines · Wang Hai
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes d8d74ea3c002 ("tpm: ibmvtpm: Wait for buffer to be set before proceeding")Reported-by Hulk Robot <[email protected]>Signed-off-by Wang Hai <[email protected]>--- drivers/char/tpm/tpm_ibmvtpm.c | 1 + 1 file changed, 1 insertion(+)drivers/char/tpm/tpm_ibmvtpm.c +0
-0
drivers/char/tpm/tpm_ibmvtpm.c static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev, · line 693
Quoted 7 lines
drivers/char/tpm/tpm_ibmvtpm.c +1
-0@@ -687,6 +687,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev, ibmvtpm->rtce_buf != NULL, HZ)) {dev_err (dev,"CRQ response timed out\n" ); + rc = -ETIMEDOUT ; goto init_irq_cleanup; }
Jarkko Sakkinen
maintainerQuoted 7 lines · Wang Hai
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes d8d74ea3c002 ("tpm: ibmvtpm: Wait for buffer to be set beforeproceeding")
Reported-by Hulk Robot <[email protected]>Signed-off-by Wang Hai <[email protected]>
Provide a reasoning for -ETIMEOUT in the commit message.
/Jarkko
Quoted 18 lines
---
drivers/char/tpm/tpm_ibmvtpm.c | 1 +1 file changed, 1 insertion(+)drivers/char/tpm/tpm_ibmvtpm.c +1
-0@@ -687,6 +687,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev, ibmvtpm->rtce_buf != NULL, HZ)) { dev_err(dev, "CRQ response timed out\n"); + rc = -ETIMEDOUT; goto init_irq_cleanup; }
Quoted 11 lines · Jarkko Sakkinen
Quoted 7 lines · Wang Hai
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes d8d74ea3c002 ("tpm: ibmvtpm: Wait for buffer to be set beforeproceeding")
Reported-by Hulk Robot <[email protected]>Signed-off-by Wang Hai <[email protected]>Provide a reasoning for
-ETIMEOUTin the commit message./Jarkko
Was this patch ever applied? I don't seem to find the infradead git tree ...