linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soundwire: bus: set initial value to port_status
@ 2019-08-29 18:11 Bard liao
  2019-09-03 13:54 ` [alsa-devel] " Pierre-Louis Bossart
  2019-09-04  6:34 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Bard liao @ 2019-08-29 18:11 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, pierre-louis.bossart, bard.liao, vkoul, gregkh,
	Blauciak, linux-kernel

From: Bard Liao <yung-chuan.liao@linux.intel.com>

port_status[port_num] are assigned for each port_num in some if
conditions. So some of the port_status may not be initialized.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 drivers/soundwire/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index f6a1e4b4813d..33f41b3e642e 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -835,7 +835,7 @@ static int sdw_handle_port_interrupt(struct sdw_slave *slave,
 static int sdw_handle_slave_alerts(struct sdw_slave *slave)
 {
 	struct sdw_slave_intr_status slave_intr;
-	u8 clear = 0, bit, port_status[15];
+	u8 clear = 0, bit, port_status[15] = {0};
 	int port_num, stat, ret, count = 0;
 	unsigned long port;
 	bool slave_notify = false;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [PATCH] soundwire: bus: set initial value to port_status
  2019-08-29 18:11 [PATCH] soundwire: bus: set initial value to port_status Bard liao
@ 2019-09-03 13:54 ` Pierre-Louis Bossart
  2019-09-04  6:34 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2019-09-03 13:54 UTC (permalink / raw)
  To: Bard liao, alsa-devel
  Cc: tiwai, gregkh, Blauciak, linux-kernel, vkoul, broonie, bard.liao



On 8/29/19 1:11 PM, Bard liao wrote:
> From: Bard Liao <yung-chuan.liao@linux.intel.com>
> 
> port_status[port_num] are assigned for each port_num in some if
> conditions. So some of the port_status may not be initialized.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> ---
>   drivers/soundwire/bus.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
> index f6a1e4b4813d..33f41b3e642e 100644
> --- a/drivers/soundwire/bus.c
> +++ b/drivers/soundwire/bus.c
> @@ -835,7 +835,7 @@ static int sdw_handle_port_interrupt(struct sdw_slave *slave,
>   static int sdw_handle_slave_alerts(struct sdw_slave *slave)
>   {
>   	struct sdw_slave_intr_status slave_intr;
> -	u8 clear = 0, bit, port_status[15];
> +	u8 clear = 0, bit, port_status[15] = {0};
>   	int port_num, stat, ret, count = 0;
>   	unsigned long port;
>   	bool slave_notify = false;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] soundwire: bus: set initial value to port_status
  2019-08-29 18:11 [PATCH] soundwire: bus: set initial value to port_status Bard liao
  2019-09-03 13:54 ` [alsa-devel] " Pierre-Louis Bossart
@ 2019-09-04  6:34 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2019-09-04  6:34 UTC (permalink / raw)
  To: Bard liao
  Cc: alsa-devel, tiwai, broonie, pierre-louis.bossart, bard.liao,
	gregkh, Blauciak, linux-kernel

On 30-08-19, 02:11, Bard liao wrote:
> From: Bard Liao <yung-chuan.liao@linux.intel.com>
> 
> port_status[port_num] are assigned for each port_num in some if
> conditions. So some of the port_status may not be initialized.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-04  6:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 18:11 [PATCH] soundwire: bus: set initial value to port_status Bard liao
2019-09-03 13:54 ` [alsa-devel] " Pierre-Louis Bossart
2019-09-04  6:34 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).