[PATCH] drm: remove unnecessary conditionals
Jingyu Wang
jingyuwang_vip at 163.com
Thu Sep 8 18:41:22 UTC 2022
iput() has already handled null and non-null parameter, so it is no
need to use if().
Signed-off-by: Jingyu Wang <jingyuwang_vip at 163.com>
---
drivers/gpu/drm/drm_drv.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 8214a0b1ab7f..beec45a89ca5 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -530,10 +530,8 @@ static struct inode *drm_fs_inode_new(void)
static void drm_fs_inode_free(struct inode *inode)
{
- if (inode) {
- iput(inode);
- simple_release_fs(&drm_fs_mnt, &drm_fs_cnt);
- }
+ iput(inode);
+ simple_release_fs(&drm_fs_mnt, &drm_fs_cnt);
}
/**
base-commit: 5957ac6635a1a12d4aa2661bbf04d3085a73372a
--
2.34.1
More information about the dri-devel
mailing list