All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: dice: fix compiler warning due to returning uninitialized value
@ 2019-06-13  3:35 Takashi Sakamoto
  2019-06-13  5:00 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Sakamoto @ 2019-06-13  3:35 UTC (permalink / raw)
  To: clemens, tiwai; +Cc: alsa-devel, kbuild test robot

This commit fixes the warning due to returning uninitialized value
from start_streams() helper function.

   sound/firewire/dice/dice-stream.c: In function 'start_streams.isra.0':
>> sound/firewire/dice/dice-stream.c:350:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int err;
         ^~~

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 3cd2c2d780a2 ("ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/dice/dice-stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/firewire/dice/dice-stream.c b/sound/firewire/dice/dice-stream.c
index f61b99a72655..e9e5c5fffb70 100644
--- a/sound/firewire/dice/dice-stream.c
+++ b/sound/firewire/dice/dice-stream.c
@@ -389,7 +389,7 @@ static int start_streams(struct snd_dice *dice, enum amdtp_stream_direction dir,
 			return err;
 	}
 
-	return err;
+	return 0;
 }
 
 /*
-- 
2.20.1

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

* Re: [PATCH] ALSA: dice: fix compiler warning due to returning uninitialized value
  2019-06-13  3:35 [PATCH] ALSA: dice: fix compiler warning due to returning uninitialized value Takashi Sakamoto
@ 2019-06-13  5:00 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-06-13  5:00 UTC (permalink / raw)
  To: Takashi Sakamoto; +Cc: alsa-devel, clemens, kbuild test robot

On Thu, 13 Jun 2019 05:35:22 +0200,
Takashi Sakamoto wrote:
> 
> This commit fixes the warning due to returning uninitialized value
> from start_streams() helper function.
> 
>    sound/firewire/dice/dice-stream.c: In function 'start_streams.isra.0':
> >> sound/firewire/dice/dice-stream.c:350:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      int err;
>          ^~~
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: 3cd2c2d780a2 ("ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

Applied, thanks.


Takashi

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

end of thread, other threads:[~2019-06-13  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13  3:35 [PATCH] ALSA: dice: fix compiler warning due to returning uninitialized value Takashi Sakamoto
2019-06-13  5:00 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.