]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: compress_core: fix open flags test in snd_compr_open()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Sep 2012 11:12:43 +0000 (14:12 +0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 11 Sep 2012 12:27:40 +0000 (14:27 +0200)
commit1069c81f739d56f44ba2928fd4b659ef0bc8a9ba
tree01609ce28354864ee3ce1fb2cc16772f91d495e5
parent2dcb8769a9bfa14a8c0221448f19b49c4118f53f
ALSA: compress_core: fix open flags test in snd_compr_open()

O_RDONLY is zero so the original test (f->f_flags & O_RDONLY) is always
false and it will never do compress capture.  The test for O_WRONLY is
also slightly off.  The original test would consider "->flags =
(O_WRONLY | O_RDWR)" as write only instead of rejecting it as invalid.

I've also removed the pr_err() because that could flood dmesg.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/compress_offload.c