projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
574d69c
)
sound: sound_firmware: Fix invalid use of vfs_read()
author
Takashi Iwai
<tiwai@suse.de>
Tue, 26 May 2015 10:57:56 +0000
(12:57 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 26 May 2015 11:48:58 +0000
(13:48 +0200)
It should use kernel_read() instead of vfs_read() to load a firmware
binary onto the kernel pages.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/sound_firmware.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/sound_firmware.c
b/sound/sound_firmware.c
index b155137ee312a5105517718d483b2db322958943..026347643c8177266359513c255b930b8bf8307e 100644
(file)
--- a/
sound/sound_firmware.c
+++ b/
sound/sound_firmware.c
@@
-12,7
+12,6
@@
static int do_mod_firmware_load(const char *fn, char **fp)
struct file* filp;
long l;
char *dp;
- loff_t pos;
filp = filp_open(fn, 0, 0);
if (IS_ERR(filp))
@@
-34,8
+33,7
@@
static int do_mod_firmware_load(const char *fn, char **fp)
fput(filp);
return 0;
}
- pos = 0;
- if (vfs_read(filp, dp, l, &pos) != l)
+ if (kernel_read(filp, 0, dp, l) != l)
{
printk(KERN_INFO "Failed to read '%s'.\n", fn);
vfree(dp);