From: Weili Qian Date: Sat, 4 Dec 2021 10:43:01 +0000 (+0800) Subject: crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8b2b88054961fbad4f82545e6100af336280bdba;p=linux.git crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume() [ Upstream commit 3f9dd4c802b96626e869b2d29c8e401dabadd23e ] 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 Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 369562d34d66a..ff1122153fbec 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -5986,7 +5986,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);