lkml.org 
[lkml]   [2004]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Document kfree and vfree NULL usage
On Sat, Nov 27, 2004 at 09:43:17PM +0100, Marcel Sebek wrote:
> diff -urpN linux-2.6.10/sound/core/init.c linux-2.6.10-new/sound/core/init.c
> --- linux-2.6.10/sound/core/init.c 2004-10-23 10:55:09.000000000 +0200
> +++ linux-2.6.10-new/sound/core/init.c 2004-11-27 21:21:50.000000000 +0100
> @@ -665,9 +665,8 @@ int snd_card_file_remove(snd_card_t *car
> spin_unlock(&card->files_lock);
> if (card->files == NULL)
> wake_up(&card->shutdown_sleep);
> - if (mfile) {
> - kfree(mfile);
> - } else {
> + kfree(mfile);
> + if (!mfile) {
> snd_printk(KERN_ERR "ALSA card file remove problem (%p)\n", file);
> return -ENOENT;
> }

The above change seems to always trigger the ENOENT return, no?

Phil

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.058 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site