From 46dc5cd3b18270511efc9b4dfc02f0d2437bdd6c Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Thu, 20 Sep 2018 18:02:53 -0700 Subject: [PATCH] qcacld-3.0: Fix return value for pld_is_fw_down Fix return value for pld_is_fw_down. Always return 0 for unsupported bus type. CRs-Fixed: 2319880 Change-Id: I64de028c7dd0c6a411b2d5b5f5e03bdfebed03cc --- core/pld/src/pld_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 04d67212004a..64cc7206f646 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -1482,7 +1482,7 @@ int pld_is_qmi_disable(struct device *dev) * * Return: 1 FW is down * 0 FW is not down - * Non zero failure code for errors + * Always return 0 for unsupported bus type */ int pld_is_fw_down(struct device *dev) { @@ -1493,6 +1493,10 @@ int pld_is_fw_down(struct device *dev) case PLD_BUS_TYPE_SNOC: ret = pld_snoc_is_fw_down(dev); break; + case PLD_BUS_TYPE_PCIE: + case PLD_BUS_TYPE_SDIO: + case PLD_BUS_TYPE_USB: + break; default: pr_err("Invalid device type %d\n", type); ret = -EINVAL;