From 95ff17564b6db34cad0cd67678fb79174e77531e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 28 Apr 2006 15:13:40 +0200 Subject: [ALSA] emux - Move EXPORT_SYMBOL() to adjacent to each function Move EXPORT_SYMBOL() to adjacent to each exported function/variable. Signed-off-by: Takashi Iwai --- sound/synth/emux/soundfont.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sound/synth/emux/soundfont.c') diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c index 32c27162dfb6..7f0bdea0dfd3 100644 --- a/sound/synth/emux/soundfont.c +++ b/sound/synth/emux/soundfont.c @@ -810,6 +810,9 @@ snd_sf_linear_to_log(unsigned int amount, int offset, int ratio) return v; } +EXPORT_SYMBOL(snd_sf_linear_to_log); + + #define OFFSET_MSEC 653117 /* base = 1000 */ #define OFFSET_ABSCENT 851781 /* base = 8176 */ #define OFFSET_SAMPLERATE 1011119 /* base = 44100 */ @@ -1485,4 +1488,3 @@ snd_soundfont_remove_unlocked(struct snd_sf_list *sflist) unlock_preset(sflist); return 0; } - -- cgit v1.2.3 From d20cad602fc3d92902dc3b4ed252359ab05eae0f Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Wed, 31 May 2006 11:55:17 +0200 Subject: [ALSA] NULL pointer dereference in sound/synth/emux/soundfont.c this is about coverity id #100. It seems the if statement is negated, since the else branch calls remove_info() with sflist->currsf as a parameter where it gets dereferenced. Signed-off-by: Eric Sesterhenn Signed-off-by: Takashi Iwai --- sound/synth/emux/soundfont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/synth/emux/soundfont.c') diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c index 7f0bdea0dfd3..455e535933ec 100644 --- a/sound/synth/emux/soundfont.c +++ b/sound/synth/emux/soundfont.c @@ -195,7 +195,7 @@ snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data, break; case SNDRV_SFNT_REMOVE_INFO: /* patch must be opened */ - if (sflist->currsf) { + if (!sflist->currsf) { snd_printk("soundfont: remove_info: patch not opened\n"); rc = -EINVAL; } else { -- cgit v1.2.3