Skip to content

Commit ea47ab1

Browse files
author
Al Viro
committed
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 <[email protected]>
1 parent b4a4f21 commit ea47ab1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ getname_kernel(const char * filename)
255255

256256
void putname(struct filename *name)
257257
{
258-
if (IS_ERR_OR_NULL(name))
258+
if (IS_ERR(name))
259259
return;
260260

261261
BUG_ON(name->refcnt <= 0);

0 commit comments

Comments
 (0)