mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: i2c: rk628: fix debugfs NULL parameter
Fixes: 84b8365717 ("media: i2c: rk628: fix debugfs "rk628" parent directory")
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ie6e0fd8439c4dcbd9e432f3ec0a47e72bce989ab
This commit is contained in:
@@ -512,9 +512,10 @@ void rk628_debugfs_create(struct rk628 *rk628)
|
||||
struct dentry *debugfs, *debugfs_tmp = debugfs_lookup("rk628", NULL);
|
||||
|
||||
debugfs = debugfs_tmp;
|
||||
if (!debugfs)
|
||||
if (IS_ERR_OR_NULL(debugfs))
|
||||
debugfs = debugfs_create_dir("rk628", NULL);
|
||||
dput(debugfs_tmp);
|
||||
if (!IS_ERR_OR_NULL(debugfs_tmp))
|
||||
dput(debugfs_tmp);
|
||||
rk628->debug_dir = debugfs_create_dir(dev_name(rk628->dev), debugfs);
|
||||
if (IS_ERR(rk628->debug_dir))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user