Commit cb562dae authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Mauro Carvalho Chehab

media: exynos4-is: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6d7a1b60
...@@ -756,18 +756,12 @@ static void fimc_is_debugfs_remove(struct fimc_is *is) ...@@ -756,18 +756,12 @@ static void fimc_is_debugfs_remove(struct fimc_is *is)
is->debugfs_entry = NULL; is->debugfs_entry = NULL;
} }
static int fimc_is_debugfs_create(struct fimc_is *is) static void fimc_is_debugfs_create(struct fimc_is *is)
{ {
struct dentry *dentry;
is->debugfs_entry = debugfs_create_dir("fimc_is", NULL); is->debugfs_entry = debugfs_create_dir("fimc_is", NULL);
dentry = debugfs_create_file("fw_log", S_IRUGO, is->debugfs_entry, debugfs_create_file("fw_log", S_IRUGO, is->debugfs_entry, is,
is, &fimc_is_fops); &fimc_is_fops);
if (!dentry)
fimc_is_debugfs_remove(is);
return is->debugfs_entry == NULL ? -EIO : 0;
} }
static int fimc_is_runtime_resume(struct device *dev); static int fimc_is_runtime_resume(struct device *dev);
...@@ -853,9 +847,7 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -853,9 +847,7 @@ static int fimc_is_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto err_pm; goto err_pm;
ret = fimc_is_debugfs_create(is); fimc_is_debugfs_create(is);
if (ret < 0)
goto err_sd;
ret = fimc_is_request_firmware(is, FIMC_IS_FW_FILENAME); ret = fimc_is_request_firmware(is, FIMC_IS_FW_FILENAME);
if (ret < 0) if (ret < 0)
...@@ -868,7 +860,6 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -868,7 +860,6 @@ static int fimc_is_probe(struct platform_device *pdev)
err_dfs: err_dfs:
fimc_is_debugfs_remove(is); fimc_is_debugfs_remove(is);
err_sd:
fimc_is_unregister_subdevs(is); fimc_is_unregister_subdevs(is);
err_pm: err_pm:
pm_runtime_put_noidle(dev); pm_runtime_put_noidle(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment