qcacmn: Return 0 if fail to covert channel/frequency

It is easier to just compare return value of reg_freq_to_chan/
reg_chan_to_freq with 0 to check whether the channel is valid.

Change-Id: I4124cc090d31687774d8d71fee4efc822e0a6b38
CRs-Fixed: 2496010
diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c
index 8cf19a0..fab24c1 100644
--- a/umac/regulatory/core/src/reg_services_common.c
+++ b/umac/regulatory/core/src/reg_services_common.c
@@ -1318,7 +1318,7 @@
 
 	if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
 		reg_err("reg pdev priv obj is NULL");
-		return QDF_STATUS_E_FAILURE;
+		return 0;
 	}
 
 	chan_list = pdev_priv_obj->cur_chan_list;
@@ -1343,7 +1343,7 @@
 
 	if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
 		reg_err("reg pdev priv obj is NULL");
-		return QDF_STATUS_E_FAILURE;
+		return 0;
 	}
 
 	chan_list = pdev_priv_obj->cur_chan_list;
diff --git a/umac/regulatory/core/src/reg_services_common.h b/umac/regulatory/core/src/reg_services_common.h
index 52df9be..5525208 100644
--- a/umac/regulatory/core/src/reg_services_common.h
+++ b/umac/regulatory/core/src/reg_services_common.h
@@ -241,7 +241,7 @@
  * @pdev: Pointer to pdev
  * @freq: Channel frequency
  *
- * Return: Channel number
+ * Return: Channel number if success, otherwise 0
  */
 uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev, uint32_t freq);
 
@@ -250,7 +250,7 @@
  * @pdev: Pointer to pdev
  * @chan_num: Channel number
  *
- * Return: Channel frequency
+ * Return: Channel frequency if success, otherwise 0
  */
 uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev, uint32_t chan_num);