Skip to content

Commit bff6efc

Browse files
TwilightTechiejonmason
authored andcommitted
ntb: hw: amd: Fix debugfs_create_dir error checking
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: Anup Sharma <anupnewsmail@gmail.com> Suggested-by: Ivan Orlov <ivan.orlov0322@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent 48063df commit bff6efc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ntb/hw/amd/ntb_hw_amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ static void ndev_init_debugfs(struct amd_ntb_dev *ndev)
941941
ndev->debugfs_dir =
942942
debugfs_create_dir(pci_name(ndev->ntb.pdev),
943943
debugfs_dir);
944-
if (!ndev->debugfs_dir)
944+
if (IS_ERR(ndev->debugfs_dir))
945945
ndev->debugfs_info = NULL;
946946
else
947947
ndev->debugfs_info =

0 commit comments

Comments
 (0)