Merge 3e29a0c49e5052523050b4f794229c0bd4d24e61 on remote branch
Change-Id: Ie19d3864bb8ce8ed9d3466dc9f4745b233ed5224
diff --git a/helium/radio_helium_hal.c b/helium/radio_helium_hal.c
index 019db8c..947402f 100644
--- a/helium/radio_helium_hal.c
+++ b/helium/radio_helium_hal.c
@@ -1977,23 +1977,31 @@
ALOGE("%s: cmd = 0x%x", __func__, cmd);
switch(cmd) {
case HCI_FM_HELIUM_FREQ:
- if (!val)
+ if (!val) {
ret = -FM_HC_STATUS_NULL_POINTER;
+ goto end;
+ }
*val = hal->radio->fm_st_rsp.station_rsp.station_freq;
break;
case HCI_FM_HELIUM_UPPER_BAND:
- if (!val)
+ if (!val) {
ret = -FM_HC_STATUS_NULL_POINTER;
+ goto end;
+ }
*val = hal->radio->recv_conf.band_high_limit;
break;
case HCI_FM_HELIUM_LOWER_BAND:
- if (!val)
+ if (!val) {
ret = -FM_HC_STATUS_NULL_POINTER;
+ goto end;
+ }
*val = hal->radio->recv_conf.band_low_limit;
break;
case HCI_FM_HELIUM_AUDIO_MUTE:
- if (!val)
+ if (!val) {
ret = -FM_HC_STATUS_NULL_POINTER;
+ goto end;
+ }
*val = hal->radio->mute_mode.hard_mute;
break;
case HCI_FM_HELIUM_SINR_SAMPLES: