diff mbox

ASoC: Intel: remove unneeded variable

Message ID alpine.DEB.2.02.1504120753060.2112@localhost6.localdomain6 (mailing list archive)
State New, archived
Headers show

Commit Message

Julia Lawall April 12, 2015, 5:55 a.m. UTC
Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Jie Yang <yang.jie@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>

---

 sst-baytrail-ipc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown April 12, 2015, 11:40 a.m. UTC | #1
On Sun, Apr 12, 2015 at 07:55:30AM +0200, Julia Lawall wrote:
> Removes unneeded variable used to store return value.

> +++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> @@ -511,7 +511,6 @@ static int sst_byt_process_notification(
>  	struct sst_byt_stream *stream;
>  	u64 header;
>  	u8 msg_id, stream_id;
> -	int handled = 1;
>  
>  	header = sst_dsp_shim_read64_unlocked(sst, SST_IPCD);
>  	msg_id = sst_byt_header_msg_id(header);
> @@ -531,7 +530,7 @@ static int sst_byt_process_notification(
>  		break;
>  	}
>  
> -	return handled;
> +	return 1;

This seems like the script has identified an error - it looks like we
should be managing handled more actively in the function.
diff mbox

Patch

--- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c
+++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
@@ -511,7 +511,6 @@  static int sst_byt_process_notification(
 	struct sst_byt_stream *stream;
 	u64 header;
 	u8 msg_id, stream_id;
-	int handled = 1;
 
 	header = sst_dsp_shim_read64_unlocked(sst, SST_IPCD);
 	msg_id = sst_byt_header_msg_id(header);
@@ -531,7 +530,7 @@  static int sst_byt_process_notification(
 		break;
 	}
 
-	return handled;
+	return 1;
 }
 
 static irqreturn_t sst_byt_irq_thread(int irq, void *context)