cxl_getfile(): fix double-iput() on alloc_file() failures
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 Jun 2018 13:43:13 +0000 (09:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jul 2018 09:25:11 +0000 (11:25 +0200)
commitea8a50e5f829ad3e855f45b29e96612a92bb1418
tree7d7e649c82ad76400f544f21d8841972724e79a9
parentb12c7d0847e224301fb2323b5a85d866ead87199
cxl_getfile(): fix double-iput() on alloc_file() failures

commit d202797f480c0e5918e7642d6716cdc62b3ab5c9 upstream.

Doing iput() after path_put() is wrong.

Cc: stable@vger.kernel.org
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cxl/api.c