提交 c7fcf255 编写于 作者: M Markus Grabner 提交者: Greg Kroah-Hartman

Staging: line6: workaround for null pointer bug

Signed-off-by: NMarkus Grabner <grabner@icg.tugraz.at>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 340362ab
...@@ -147,6 +147,9 @@ void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize) ...@@ -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; const int bytes_per_frame = line6pcm->properties->bytes_per_frame;
int frames = fsize / bytes_per_frame; int frames = fsize / bytes_per_frame;
if (runtime == 0)
return;
if (line6pcm->pos_in_done + frames > runtime->buffer_size) { if (line6pcm->pos_in_done + frames > runtime->buffer_size) {
/* /*
The transferred area goes over buffer boundary, The transferred area goes over buffer boundary,
......
#ifndef DRIVER_REVISION #ifndef DRIVER_REVISION
/* current subversion revision */ /* current subversion revision */
#define DRIVER_REVISION " (revision 684)" #define DRIVER_REVISION " (revision 690)"
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册