From: Dan Carpenter <error27@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>,
Eliot Blennerhassett <eblennerhassett@audioscience.com>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: [patch -next] asihpi: testing the wrong variable
Date: Fri, 14 May 2010 16:49:20 +0200 [thread overview]
Message-ID: <20100514144920.GC17487@bicker> (raw)
There is a typo here. We want to test "*dst" not "dst".
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
index 254c580..15f0c7e 100644
--- a/sound/pci/asihpi/hpifunc.c
+++ b/sound/pci/asihpi/hpifunc.c
@@ -3279,7 +3279,7 @@ static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,
buf_size = hpi_entity_size(src);
*dst = kmalloc(buf_size, GFP_KERNEL);
- if (dst == NULL)
+ if (*dst == NULL)
return HPI_ERROR_MEMORY_ALLOC;
memcpy(*dst, src, buf_size);
return 0;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>,
Eliot Blennerhassett <eblennerhassett@audioscience.com>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org
Subject: [patch -next] asihpi: testing the wrong variable
Date: Fri, 14 May 2010 14:49:20 +0000 [thread overview]
Message-ID: <20100514144920.GC17487@bicker> (raw)
There is a typo here. We want to test "*dst" not "dst".
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
index 254c580..15f0c7e 100644
--- a/sound/pci/asihpi/hpifunc.c
+++ b/sound/pci/asihpi/hpifunc.c
@@ -3279,7 +3279,7 @@ static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,
buf_size = hpi_entity_size(src);
*dst = kmalloc(buf_size, GFP_KERNEL);
- if (dst = NULL)
+ if (*dst = NULL)
return HPI_ERROR_MEMORY_ALLOC;
memcpy(*dst, src, buf_size);
return 0;
next reply other threads:[~2010-05-14 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-14 14:49 Dan Carpenter [this message]
2010-05-14 14:49 ` [patch -next] asihpi: testing the wrong variable Dan Carpenter
2010-05-17 6:16 ` Takashi Iwai
2010-05-17 6:16 ` Takashi Iwai
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=20100514144920.GC17487@bicker \
--to=error27@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=eblennerhassett@audioscience.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/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 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.