From: Jesper Juhl <jesper.juhl@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>, Jesper Juhl <jesper.juhl@gmail.com>
Subject: [PATCH]no need to check pointers passed to vfree() for NULL in sound/usb/usbaudio.c
Date: Sat, 4 Feb 2006 21:22:03 +0100 [thread overview]
Message-ID: <200602042122.03187.jesper.juhl@gmail.com> (raw)
There's no need to check pointers passed to vfree() for NULL.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
sound/usb/usbaudio.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
--- linux-2.6.16-rc2-git1-orig/sound/usb/usbaudio.c 2006-02-04 14:44:23.000000000 +0100
+++ linux-2.6.16-rc2-git1/sound/usb/usbaudio.c 2006-02-04 21:19:03.000000000 +0100
@@ -725,10 +725,9 @@ static int snd_pcm_alloc_vmalloc_buffer(
static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs)
{
struct snd_pcm_runtime *runtime = subs->runtime;
- if (runtime->dma_area) {
- vfree(runtime->dma_area);
- runtime->dma_area = NULL;
- }
+
+ vfree(runtime->dma_area);
+ runtime->dma_area = NULL;
return 0;
}
reply other threads:[~2006-02-04 20:21 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=200602042122.03187.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome