diff options
author | Markus Grabner <grabner@icg.tugraz.at> | 2010-09-17 23:33:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-20 17:04:35 -0700 |
commit | c7fcf25525b3cd6559f882837bfa76d04a80f8a6 (patch) | |
tree | d1e16360218f0d2b9f726953b702a54a4fac347c /drivers/staging/line6/capture.c | |
parent | 340362abb9544043d41e047c63d86dffe990a48c (diff) |
Staging: line6: workaround for null pointer bug
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/line6/capture.c')
-rw-r--r-- | drivers/staging/line6/capture.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, |