media: atomisp: remove redundant NULL check of "params"
authorDing Xiang <dingxiang@cmss.chinamobile.com>
Tue, 17 Nov 2020 08:10:58 +0000 (09:10 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 22 Mar 2021 16:55:42 +0000 (17:55 +0100)
The check result of (!A || (A && B)) is equivalent to (!A || B),
so remove redundant NULL check of "params"

Link: https://lore.kernel.org/linux-media/20201117081058.673291-1-dingxiang@cmss.chinamobile.com
Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/sh_css_params.c

index 9fad28b97201c8b36f5c7986e53d11829ef5a339..74672564ec006529d91558489e34539a5eb84613 100644 (file)
@@ -4649,10 +4649,8 @@ ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream)
        params = stream->isp_params_configs;
 
        /* Backward compatibility by default consider pipe as Video*/
-       if (!params || (params &&
-                       !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])) {
+       if (!params || !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])
                goto err;
-       }
 
        dvs_config = kvcalloc(1, sizeof(struct ia_css_dvs_6axis_config),
                              GFP_KERNEL);