From: Markus Grabner Date: Fri, 17 Sep 2010 21:33:25 +0000 (+0200) Subject: Staging: line6: workaround for null pointer bug X-Git-Tag: v2.6.37-rc1~60^2~3^2~533 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c7fcf25525b3cd6559f882837bfa76d04a80f8a6;p=karo-tx-linux.git Staging: line6: workaround for null pointer bug Signed-off-by: Markus Grabner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index a3c99244b359..06a6db889fbd 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c @@ -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, diff --git a/drivers/staging/line6/revision.h b/drivers/staging/line6/revision.h index e9883f6d2ecc..350d0dfff8f8 100644 --- a/drivers/staging/line6/revision.h +++ b/drivers/staging/line6/revision.h @@ -1,4 +1,4 @@ #ifndef DRIVER_REVISION /* current subversion revision */ -#define DRIVER_REVISION " (revision 684)" +#define DRIVER_REVISION " (revision 690)" #endif