[lvc-project] [PATCH 5.10 1/1] media: atomisp: fix "variable dereferenced before check 'asd'"

Greg Kroah-Hartman gregkh at linuxfoundation.org
Wed Jun 28 21:21:33 MSK 2023


On Tue, Jun 27, 2023 at 01:23:34PM +0300, Anastasia Belova wrote:
> From: Tsuchiya Yuto <kitakar at gmail.com>
> 
> commit ac56760a8bbb4e654b2fd54e5de79dd5d72f937d upstream.
> 
> There are two occurrences where the variable 'asd' is dereferenced
> before check. Fix this issue by using the variable after the check.
> 
> Link: https://lore.kernel.org/linux-media/20211122074122.GA6581@kili/
> 
> Link: https://lore.kernel.org/linux-media/20211201141904.47231-1-kitakar@gmail.com
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: Tsuchiya Yuto <kitakar at gmail.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>
> Signed-off-by: Anastasia Belova <abelova at astralinux.ru>
> ---
>  drivers/staging/media/atomisp/pci/atomisp_cmd.c   | 3 ++-
>  drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)

Now queued up, thanks.

greg k-h



More information about the lvc-project mailing list