Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: atomisp: remove redundant NULL check

Fix below warnings reported by coccicheck:
./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4269:2-8: WARNING:
NULL check before some freeing functions is not needed.
./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4626:2-8: WARNING:
NULL check before some freeing functions is not needed.

Link: https://lore.kernel.org/linux-media/1611220312-89384-3-git-send-email-abaci-bugfix@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Yang Li and committed by
Mauro Carvalho Chehab
ac68fb7f 58fba0b1

+2 -4
+2 -4
drivers/staging/media/atomisp/pci/atomisp_cmd.c
··· 4265 4265 apply_parameter_failed: 4266 4266 if (css_param) 4267 4267 atomisp_free_css_parameters(css_param); 4268 - if (param) 4269 - kvfree(param); 4268 + kvfree(param); 4270 4269 4271 4270 return ret; 4272 4271 } ··· 4625 4626 err: 4626 4627 if (ret && res) 4627 4628 ia_css_frame_free(res); 4628 - if (tmp_buf) 4629 - vfree(tmp_buf); 4629 + vfree(tmp_buf); 4630 4630 if (ret == 0) 4631 4631 *result = res; 4632 4632 return ret;