radio: iris: Fix the FM FTM Tx set station issue

The get station parameters command failed during FM Tx as this is
specific to Fm Rx.Add the check before issuing the get station
parameters command

CRs-Fixed: 323778
Change-Id: Ie1a00fe5bf742c2c8158cff563c56d7fea44a21e
Signed-off-by: Srinivasa Rao Uppala <uppalas@codeaurora.org>
diff --git a/drivers/media/radio/radio-iris.c b/drivers/media/radio/radio-iris.c
index 8a65df4..fd5fcd2 100644
--- a/drivers/media/radio/radio-iris.c
+++ b/drivers/media/radio/radio-iris.c
@@ -2979,9 +2979,11 @@
 {
 	int retval;
 	struct iris_device *radio = video_get_drvdata(video_devdata(file));
-	if (tuner->index > 0)
-		return -EINVAL;
 
+	if (tuner->index > 0) {
+		FMDERR("Invalid Tuner Index");
+		return -EINVAL;
+	}
 	if (radio->mode == FM_RECV) {
 		retval = hci_cmd(HCI_FM_GET_STATION_PARAM_CMD, radio->fm_hdev);
 		if (retval < 0) {
@@ -3057,16 +3059,12 @@
 		struct v4l2_frequency *freq)
 {
 	struct iris_device *radio = video_get_drvdata(video_devdata(file));
-	int retval;
-
-	freq->type = V4L2_TUNER_RADIO;
-	retval = hci_cmd(HCI_FM_GET_STATION_PARAM_CMD, radio->fm_hdev);
-	if (retval < 0)
-		FMDERR("get frequency failed %d\n", retval);
-	else
+	if ((freq != NULL) && (radio != NULL)) {
 		freq->frequency =
 			radio->fm_st_rsp.station_rsp.station_freq * TUNE_PARAM;
-	return retval;
+	} else
+		return -EINVAL;
+	return 0;
 }
 
 static int iris_vidioc_s_frequency(struct file *file, void *priv,