cnss2: treat no wlan regulator as no error

If device tree doesn't configure any regulators for
device, means this device doesn't need extra regulator.
This case shall not be treated as an error.

Return a positive value for this case to allow caller to
make proper choice.

Change-Id: I7ead81b3915d16f966f94c9d916e0d67bc04fda0
CRs-Fixed: 3355141
This commit is contained in:
Nijun Gong
2022-12-26 21:44:56 +08:00
parent ef9321c23d
commit d173765b26
3 changed files with 15 additions and 7 deletions

View File

@@ -1251,7 +1251,7 @@ static int cnss_get_resources(struct cnss_plat_data *plat_priv)
int ret = 0;
ret = cnss_get_vreg_type(plat_priv, CNSS_VREG_PRIM);
if (ret) {
if (ret < 0) {
cnss_pr_err("Failed to get vreg, err = %d\n", ret);
goto out;
}