[PATCH 4.14 ] ALSA: Corrects warning: missing braces around initializer

From: john . p . donnelly
Date: Fri Oct 30 2020 - 11:47:39 EST


From: John Donnelly <john.p.donnelly@xxxxxxxxxx>

The assignment statement of a local variable "struct hpi_pci pci = { 0
}; " is not valid for all versions of compiler.

Fixes: 9c3c9d37ae1e ("ALSA: asihpi: fix iounmap in error handler")

Signed-off-by: John Donnelly <john.p.donnelly@xxxxxxxxxx>
---
sound/pci/asihpi/hpioctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c
index b4ccd9f92400..1cd7c197ab96 100644
--- a/sound/pci/asihpi/hpioctl.c
+++ b/sound/pci/asihpi/hpioctl.c
@@ -350,8 +350,9 @@ int asihpi_adapter_probe(struct pci_dev *pci_dev,
struct hpi_message hm;
struct hpi_response hr;
struct hpi_adapter adapter;
- struct hpi_pci pci = { 0 };
+ struct hpi_pci pci;

+ memset(&pci, 0, sizeof(pci));
memset(&adapter, 0, sizeof(adapter));

dev_printk(KERN_DEBUG, &pci_dev->dev,
--
2.27.0