cnss2: Use proper return code for not supported operation

ENOTSUPP is not a SUSV4 error code, use EOPNOTSUPP instead.

Change-Id: I8755486cb47880e52182370ed6939f655424c7d5
Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
Yue Ma 2020-12-04 20:14:43 -08:00
commit 2e621fdfeb
2 changed files with 2 additions and 2 deletions

View file

@ -328,7 +328,7 @@ int cnss_set_pcie_gen_speed(struct device *dev, u8 pcie_gen_speed)
if (plat_priv->device_id != QCA6490_DEVICE_ID ||
!plat_priv->fw_pcie_gen_switch)
return -ENOTSUPP;
return -EOPNOTSUPP;
if (pcie_gen_speed < QMI_PCIE_GEN_SPEED_1_V01 ||
pcie_gen_speed > QMI_PCIE_GEN_SPEED_3_V01)

View file

@ -528,7 +528,7 @@ static int cnss_setup_bus_bandwidth(struct cnss_plat_data *plat_priv,
struct cnss_bus_bw_info *bus_bw_info;
if (!plat_priv->icc.path_count)
return -ENOTSUPP;
return -EOPNOTSUPP;
if (bw >= plat_priv->icc.bus_bw_cfg_count) {
cnss_pr_err("Invalid bus bandwidth Type: %d", bw);