Staging: line6: workaround for null pointer bug
authorMarkus Grabner <grabner@icg.tugraz.at>
Fri, 17 Sep 2010 21:33:25 +0000 (23:33 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Sep 2010 00:04:35 +0000 (17:04 -0700)
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/line6/capture.c
drivers/staging/line6/revision.h

index a3c99244b3592f3bd6392e4b807da3c852df8b7c..06a6db889fbd79f4d6686dd2fa2e095345e06170 100644 (file)
@@ -147,6 +147,9 @@ void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize)
        const int bytes_per_frame = line6pcm->properties->bytes_per_frame;
        int frames = fsize / bytes_per_frame;
 
+       if (runtime == 0)
+               return;
+
        if (line6pcm->pos_in_done + frames > runtime->buffer_size) {
                /*
                   The transferred area goes over buffer boundary,
index e9883f6d2ecc7ae69972c9680d368d8433e78862..350d0dfff8f8d9d09a0ab42ca8e67a3c6ec42eef 100644 (file)
@@ -1,4 +1,4 @@
 #ifndef DRIVER_REVISION
 /* current subversion revision */
-#define DRIVER_REVISION " (revision 684)"
+#define DRIVER_REVISION " (revision 690)"
 #endif