]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: rockchip: rkisp1: remove useless debugfs checks
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 1 Dec 2020 14:30:58 +0000 (15:30 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 3 Dec 2020 07:59:10 +0000 (08:59 +0100)
The debugfs_create_dir() function never returns NULLs so this code will
never be executed.  It's not intended that callers will check for
debugfs errors in the normal case and it's not necessary in this driver,
so we can just delete this code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c

index 9af137e4967f2e87dfd2e84533a0cbe1b715bc83..68da1eed753dc87bb0565ae8af658467d530942f 100644 (file)
@@ -430,10 +430,6 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
        struct rkisp1_debug *debug = &rkisp1->debug;
 
        debug->debugfs_dir = debugfs_create_dir(RKISP1_DRIVER_NAME, NULL);
-       if (!debug->debugfs_dir) {
-               dev_dbg(rkisp1->dev, "failed to create debugfs directory\n");
-               return;
-       }
        debugfs_create_ulong("data_loss", 0444, debug->debugfs_dir,
                             &debug->data_loss);
        debugfs_create_ulong("outform_size_err", 0444,  debug->debugfs_dir,