Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370051
b: refs/heads/master
c: 434b5a2
h: refs/heads/master
i:
  370049: cc08cb8
  370047: 681d71d
v: v3
  • Loading branch information
Al Viro committed Apr 9, 2013
1 parent 1bdc84f commit ea52f26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 264bd6602edd9f309c67685770bc1c8103699428
refs/heads/master: 434b5a2e2dfd2a15bde68ed7ed2d4150eceb04e0
9 changes: 5 additions & 4 deletions trunk/sound/sound_firmware.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <asm/uaccess.h>
Expand All @@ -23,25 +24,25 @@ static int do_mod_firmware_load(const char *fn, char **fp)
if (l <= 0 || l > 131072)
{
printk(KERN_INFO "Invalid firmware '%s'\n", fn);
filp_close(filp, NULL);
fput(filp);
return 0;
}
dp = vmalloc(l);
if (dp == NULL)
{
printk(KERN_INFO "Out of memory loading '%s'.\n", fn);
filp_close(filp, NULL);
fput(filp);
return 0;
}
pos = 0;
if (vfs_read(filp, dp, l, &pos) != l)
{
printk(KERN_INFO "Failed to read '%s'.\n", fn);
vfree(dp);
filp_close(filp, NULL);
fput(filp);
return 0;
}
filp_close(filp, NULL);
fput(filp);
*fp = dp;
return (int) l;
}
Expand Down

0 comments on commit ea52f26

Please sign in to comment.