[PATCH] Fix NULL derefence in OSS MAUI driver.

From: Dave Jones
Date: Wed Sep 01 2004 - 11:57:43 EST


Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/sound/oss/maui.c linux-2.6/sound/oss/maui.c
--- bk-linus/sound/oss/maui.c 2004-08-28 21:57:25.000000000 +0100
+++ linux-2.6/sound/oss/maui.c 2004-09-01 13:31:21.000000000 +0100
@@ -383,9 +383,8 @@ static int __init probe_maui(struct addr
*/

synth = midi_devs[this_dev]->converter;
- synth->id = "MAUI";
-
if (synth != NULL) {
+ synth->id = "MAUI";
orig_load_patch = synth->load_patch;
synth->load_patch = &maui_load_patch;
} else
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/