Messages in this thread | | | Subject | Re: [PATCH] Document kfree and vfree NULL usage | From | Pekka Enberg <> | Date | Sat, 27 Nov 2004 21:30:43 +0200 |
| |
Hi Marcel,
On Sat, 2004-11-27 at 18:13 +0100, Marcel Sebek wrote: > I've cleaned up sound/ directory from "if (x) {k/v}free(x);" and similar > constructions. I'm going to to this for most of the kernel if I found > some time.
I have patches to clean up vfree() in the kernel which I am planning to send to the maintainers.
On Sat, 2004-11-27 at 18:13 +0100, Marcel Sebek wrote: > static int snd_emu10k1_playback_open(snd_pcm_substream_t * substream) > diff -urpN linux-2.6.10-rc2/sound/pci/ice1712/ak4xxx.c linux-2.6.10-rc2.changed/sound/pci/ice1712/ak4xxx.c > --- linux-2.6.10-rc2/sound/pci/ice1712/ak4xxx.c 2004-09-13 19:45:33.000000000 +0200 > +++ linux-2.6.10-rc2.changed/sound/pci/ice1712/ak4xxx.c 2004-11-27 17:21:57.000000000 +0100 > @@ -151,8 +151,7 @@ void snd_ice1712_akm4xxx_free(ice1712_t > return; > for (akidx = 0; akidx < ice->akm_codecs; akidx++) { > akm4xxx_t *ak = &ice->akm[akidx]; > - if (ak->private_value[0]) > - kfree((void *)ak->private_value[0]); > + kfree(ak->private_value[0]);
Did you compile this? The type of ak->private_value seems to be unsigned long so you need that cast here.
Please compile the kernel with allmodconfig to make sure you did not break anything and then send these to the ALSA maintainers.
Pekka
- 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/
| |