2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-13 07:44:00 +08:00

putname(): IS_ERR_OR_NULL() is wrong here

Mixing NULL and ERR_PTR() just in case is a Bad Idea(tm).  For
struct filename the former is wrong - failures are reported
as ERR_PTR(...), not as NULL.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2021-09-07 16:14:05 -04:00
parent b4a4f213a3
commit ea47ab1116

View File

@ -255,7 +255,7 @@ getname_kernel(const char * filename)
void putname(struct filename *name)
{
if (IS_ERR_OR_NULL(name))
if (IS_ERR(name))
return;
BUG_ON(name->refcnt <= 0);