Blob Blame History Raw
From d0ee674bb5d3787ca0122c5ae8e52680de0e7c52 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 6 Mar 2020 09:12:31 +0100
Subject: [PATCH] ALSA: usb-audio: Fix missing braces in some struct inits
Git-commit: d0ee674bb5d3787ca0122c5ae8e52680de0e7c52
Patch-mainline: v5.7-rc1
References: git-fixes

The struct s1810c_state_packet contains the array in the first field
hence zero-initialization requires a more couple of braces.  Fix the
compile warning pointing it out:
   sound/usb/mixer_s1810c.c: In function 'snd_sc1810c_get_status_field':
   sound/usb/mixer_s1810c.c:178:9: warning: missing braces around initializer [-Wmissing-braces]

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 8dc5efe3d17c ("ALSA: usb-audio: Add support for Presonus Studio 1810c")
Link: https://lore.kernel.org/r/202002210251.WgMfvKJP%lkp@intel.com
Link: https://lore.kernel.org/r/20200306081231.7940-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/usb/mixer_s1810c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/usb/mixer_s1810c.c b/sound/usb/mixer_s1810c.c
index 816879a07f82..6483e47bafd0 100644
--- a/sound/usb/mixer_s1810c.c
+++ b/sound/usb/mixer_s1810c.c
@@ -175,8 +175,8 @@ static int
 snd_sc1810c_get_status_field(struct usb_device *dev,
 			     u32 *field, int field_idx, uint16_t *seqnum)
 {
-	struct s1810c_state_packet pkt_out = { 0 };
-	struct s1810c_state_packet pkt_in = { 0 };
+	struct s1810c_state_packet pkt_out = { { 0 } };
+	struct s1810c_state_packet pkt_in = { { 0 } };
 	int ret = 0;
 
 	pkt_out.fields[SC1810C_STATE_F1_IDX] = SC1810C_SET_STATE_F1;
-- 
2.16.4