lkml.org 
[lkml]   [2005]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.12-rc3-mm3: ALSA broken ?

On 05.27, Takashi Iwai wrote:
> At Thu, 26 May 2005 23:51:58 +0000,
> J.A. Magallon wrote:
>
> > A side note. In the process of solving all this, I tried to generate a patch
> > for 1.0.9rc4a against -mm. I noticed some things:
> > - Your code reverts some in-kernel changes related to
> > if (ptr)
> > kfree(ptr)
> > The if is killed in mainline, as kfree accepts null pointers.
>
> Could you point which places?
>

Oops, I think this is not ALSA specific code.
I took the directory alsa-kernel, in the alsa tarball, and diffed against
2.6.12-rc5-mm1:

--- /usr/src/linux-2.6.12-rc5-mm1/sound/core/seq/oss/seq_oss_synth.c 2005-05-27 00:25:37.000000000 +0200
+++ alsa-kernel/core/seq/oss/seq_oss_synth.c 2005-01-20 18:42:37.000000000 +0100
@@ -325,10 +325,14 @@
}
snd_use_lock_free(&rec->use_lock);
}
- kfree(info->sysex);
- info->sysex = NULL;
- kfree(info->ch);
- info->ch = NULL;
+ if (info->sysex) {
+ kfree(info->sysex);
+ info->sysex = NULL;
+ }
+ if (info->ch) {
+ kfree(info->ch);
+ info->ch = NULL;
+ }
}
dp->synth_opened = 0;
dp->max_synthdev = 0;
@@ -414,10 +418,14 @@
dp->file_mode) < 0) {
midi_synth_dev.opened--;
info->opened = 0;
- kfree(info->sysex);
- info->sysex = NULL;
- kfree(info->ch);
- info->ch = NULL;
+ if (info->sysex) {
+ kfree(info->sysex);
+ info->sysex = NULL;
+ }
+ if (info->ch) {
+ kfree(info->ch);
+ info->ch = NULL;
+ }
}
return;
}
This looks like OSS code. Why does the tarball include OSS code ?
Which is the correct way to generate a patch against a kernel tree ?

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.11-jam20 (gcc 4.0.0 (4.0.0-3mdk for Mandriva Linux release 2006.0))


-
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-05-27 23:21    [W:0.167 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site