diff mbox series

crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume()

Message ID 20211204104301.32666-1-qianweili@huawei.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume() | expand

Commit Message

Weili Qian Dec. 4, 2021, 10:43 a.m. UTC
When hisi_qm_resume() returns 0, it indicates that the device has started
successfully.  If the device fails to start, hisi_qm_resume() needs to
return the actual error code to the caller instead of 0.

Fixes: d7ea53395b72 ("crypto: hisilicon - add runtime PM ops")
Signed-off-by: Weili Qian <qianweili@huawei.com>
---
 drivers/crypto/hisilicon/qm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Dec. 11, 2021, 5:56 a.m. UTC | #1
On Sat, Dec 04, 2021 at 06:43:01PM +0800, Weili Qian wrote:
> When hisi_qm_resume() returns 0, it indicates that the device has started
> successfully.  If the device fails to start, hisi_qm_resume() needs to
> return the actual error code to the caller instead of 0.
> 
> Fixes: d7ea53395b72 ("crypto: hisilicon - add runtime PM ops")
> Signed-off-by: Weili Qian <qianweili@huawei.com>
> ---
>  drivers/crypto/hisilicon/qm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index ad706ccfe91a..896255aec87f 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -6071,7 +6071,7 @@  int hisi_qm_resume(struct device *dev)
 	if (ret)
 		pci_err(pdev, "failed to start qm(%d)\n", ret);
 
-	return 0;
+	return ret;
 }
 EXPORT_SYMBOL_GPL(hisi_qm_resume);