crypto: hisilicon/qm - fix incorrect return value of hisi_qm_resume()
authorWeili Qian <qianweili@huawei.com>
Sat, 4 Dec 2021 10:43:01 +0000 (18:43 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 11 Dec 2021 05:49:18 +0000 (16:49 +1100)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c

index ad706cc..896255a 100644 (file)
@@ -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);