mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-15 02:47:34 +07:00
sound_firmware: don't pass crap to filp_close()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
20818a0caa
commit
586093064d
@ -23,14 +23,14 @@ static int do_mod_firmware_load(const char *fn, char **fp)
|
|||||||
if (l <= 0 || l > 131072)
|
if (l <= 0 || l > 131072)
|
||||||
{
|
{
|
||||||
printk(KERN_INFO "Invalid firmware '%s'\n", fn);
|
printk(KERN_INFO "Invalid firmware '%s'\n", fn);
|
||||||
filp_close(filp, current->files);
|
filp_close(filp, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
dp = vmalloc(l);
|
dp = vmalloc(l);
|
||||||
if (dp == NULL)
|
if (dp == NULL)
|
||||||
{
|
{
|
||||||
printk(KERN_INFO "Out of memory loading '%s'.\n", fn);
|
printk(KERN_INFO "Out of memory loading '%s'.\n", fn);
|
||||||
filp_close(filp, current->files);
|
filp_close(filp, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pos = 0;
|
pos = 0;
|
||||||
@ -38,10 +38,10 @@ static int do_mod_firmware_load(const char *fn, char **fp)
|
|||||||
{
|
{
|
||||||
printk(KERN_INFO "Failed to read '%s'.\n", fn);
|
printk(KERN_INFO "Failed to read '%s'.\n", fn);
|
||||||
vfree(dp);
|
vfree(dp);
|
||||||
filp_close(filp, current->files);
|
filp_close(filp, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
filp_close(filp, current->files);
|
filp_close(filp, NULL);
|
||||||
*fp = dp;
|
*fp = dp;
|
||||||
return (int) l;
|
return (int) l;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user