]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
media: atomisp: Remove unnecessary NULL check in atomisp_param
authorNathan Chancellor <natechancellor@gmail.com>
Wed, 27 May 2020 07:11:48 +0000 (09:11 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Jun 2020 16:17:13 +0000 (18:17 +0200)
commit541f681340c4248ce49f4dbaa64ce227914ad5e7
treee61530f75898e63bf6c4ab39cd8ec256e850ded5
parenta91727dfafe74b70f10e94b151aab837d375ce03
media: atomisp: Remove unnecessary NULL check in atomisp_param

Clang warns:

drivers/staging/media/atomisp/pci/atomisp_cmd.c:4278:17: warning:
address of 'config->info' will always evaluate to 'true'
[-Wpointer-bool-conversion]
                if (!&config->info) {
                    ~ ~~~~~~~~^~~~

config cannot be NULL because it comes from an ioctl, which ensures that
the user is not giving us an invalid pointer through copy_from_user. If
config is not NULL, info cannot be NULL. Remove this check.

Link: https://github.com/ClangBuiltLinux/linux/issues/1036
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_cmd.c