linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: john.p.donnelly@oracle.com
To: linux-kernel@vger.kernel.org
Cc: trix@redhat.com, tiwai@suse.de
Subject: [PATCH 4.14 ] ALSA: Corrects warning: missing braces around initializer
Date: Fri, 30 Oct 2020 08:47:31 -0700	[thread overview]
Message-ID: <20201030154731.6669-1-john.p.donnelly@oracle.com> (raw)

From: John Donnelly <john.p.donnelly@oracle.com>

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@oracle.com>
---
 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


                 reply	other threads:[~2020-10-30 15:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20201030154731.6669-1-john.p.donnelly@oracle.com \
    --to=john.p.donnelly@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=trix@redhat.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;
as well as URLs for NNTP newsgroup(s).