nbd: Fix debugfs_create_dir error checking
authorIvan Orlov <ivan.orlov0322@gmail.com>
Fri, 12 May 2023 13:05:32 +0000 (17:05 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:34:09 +0000 (10:34 +0200)
commit5af920e4d1d120b6a0cca246b242b296f0da96f8
treeae2b53e226741965997a723bdfb3910bbd1b91ea
parentf83c32ed05d428884918eca34a7d87378f0194cd
nbd: Fix debugfs_create_dir error checking

[ Upstream commit 4913cfcf014c95f0437db2df1734472fd3e15098 ]

The debugfs_create_dir function returns ERR_PTR in case of error, and the
only correct way to check if an error occurred is 'IS_ERR' inline function.
This patch will replace the null-comparison with IS_ERR.

Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230512130533.98709-1-ivan.orlov0322@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/nbd.c