]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix NULL derefence in OSS MAUI driver.
authorDave Jones <davej@redhat.com>
Thu, 2 Sep 2004 07:36:41 +0000 (00:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 2 Sep 2004 07:36:41 +0000 (00:36 -0700)
Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/maui.c

index 4f749b5b7e6a24fdd134853e57154591856f834e..0c0d53e877d909bf92f4c330a69daea2eae8bf98 100644 (file)
@@ -383,9 +383,8 @@ static int __init probe_maui(struct address_info *hw_config)
                 */
 
                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