This patch removes the error checking for debugfs_create_dir in pcmtest.c. This is because the DebugFS kernel API is developed in a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes. The debugfs APIs have a IS_ERR() judge in start_creating() which can handle it gracefully. So these checks are unnecessary.
Signed-off-by: Ruan Jinjie ruanjinjie@huawei.com --- sound/drivers/pcmtest.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/sound/drivers/pcmtest.c b/sound/drivers/pcmtest.c index 7f170429eb8f..9360b3bb771e 100644 --- a/sound/drivers/pcmtest.c +++ b/sound/drivers/pcmtest.c @@ -669,8 +669,6 @@ static int init_debug_files(int buf_count) char len_file_name[32];
driver_debug_dir = debugfs_create_dir("pcmtest", NULL); - if (IS_ERR(driver_debug_dir)) - return PTR_ERR(driver_debug_dir); debugfs_create_u8("pc_test", 0444, driver_debug_dir, &playback_capture_test); debugfs_create_u8("ioctl_test", 0444, driver_debug_dir, &ioctl_reset_test);