public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Bard liao <yung-chuan.liao@linux.intel.com>, alsa-devel@alsa-project.org
Cc: tiwai@suse.de, gregkh@linuxfoundation.org,
	Blauciak@alsa-project.org, linux-kernel@vger.kernel.org,
	vkoul@kernel.org, broonie@kernel.org, bard.liao@intel.com
Subject: Re: [alsa-devel] [PATCH] soundwire: bus: set initial value to port_status
Date: Tue, 3 Sep 2019 08:54:37 -0500	[thread overview]
Message-ID: <f75ff0ea-efe1-def5-3fcf-1e90a817234c@linux.intel.com> (raw)
In-Reply-To: <20190829181135.16049-1-yung-chuan.liao@linux.intel.com>



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;
> 

  reply	other threads:[~2019-09-03 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 18:11 [PATCH] soundwire: bus: set initial value to port_status Bard liao
2019-09-03 13:54 ` Pierre-Louis Bossart [this message]
2019-09-04  6:34 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f75ff0ea-efe1-def5-3fcf-1e90a817234c@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=Blauciak@alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox