Skip to content

Commit

Permalink
Staging: line6: workaround for null pointer bug
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Markus Grabner authored and Greg Kroah-Hartman committed Sep 21, 2010
1 parent 340362a commit c7fcf25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/staging/line6/capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/line6/revision.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef DRIVER_REVISION
/* current subversion revision */
#define DRIVER_REVISION " (revision 684)"
#define DRIVER_REVISION " (revision 690)"
#endif

0 comments on commit c7fcf25

Please sign in to comment.