linux-stable/drivers/crypto
Gaosheng Cui 84ebdb6b65 crypto: img-hash - Fix variable dereferenced before check 'hdev->req'
[ Upstream commit 04ba54e5af ]

Smatch report warning as follows:

drivers/crypto/img-hash.c:366 img_hash_dma_task() warn: variable
dereferenced before check 'hdev->req'

Variable dereferenced should be done after check 'hdev->req',
fix it.

Fixes: d358f1abbf ("crypto: img-hash - Add Imagination Technologies hw hash accelerator")
Fixes: 10badea259 ("crypto: img-hash - Fix null pointer exception")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:37 +01:00
..
allwinner crypto: sun8i-ss - use dma_addr instead u32 2022-12-31 13:32:30 +01:00
amcc crypto: amcc - Hold the reference returned by of_find_compatible_node 2022-07-08 15:21:16 +08:00
amlogic crypto: amlogic - Remove kcalloc without check 2022-12-31 13:32:36 +01:00
aspeed crypto: aspeed - Remove redundant dev_err call 2022-09-30 13:59:13 +08:00
axis crypto: artpec6 - Fix printk warning on size_t/%d 2022-09-24 16:14:43 +08:00
bcm crypto: bcm - Simplify obtain the name for cipher 2022-09-30 13:59:13 +08:00
caam crypto: caam/qi2 - switch to netif_napi_add_tx_weight() 2022-07-15 16:43:21 +08:00
cavium crypto: nitrox - avoid double free on error path in nitrox_sriov_init() 2022-12-31 13:32:30 +01:00
ccp crypto: ccp - Remove the unneeded result variable 2022-09-30 13:57:50 +08:00
ccree crypto: ccree - Make cc_debugfs_global_fini() available for module init function 2022-12-31 13:32:33 +01:00
chelsio treewide: Replace open-coded flex arrays in unions 2021-10-18 12:28:53 -07:00
gemini Revert "crypto: gemini - Fix error check for dma_map_sg" 2022-09-02 18:15:53 +08:00
hisilicon crypto: hisilicon/qm - fix 'QM_XEQ_DEPTH_CAP' mask value 2022-12-31 13:32:35 +01:00
inside-secure crypto: inside-secure - Replace generic aes with libaes 2022-09-24 16:14:43 +08:00
keembay crypto: keembay-ocs - Drop obsolete dependency on COMPILE_TEST 2022-08-19 18:39:36 +08:00
marvell crypto: marvell/octeontx - use sysfs_emit() to instead of scnprintf() 2022-09-30 13:59:13 +08:00
nx crypto: nx - Remove the unneeded result variable 2022-09-09 16:18:33 +08:00
qat crypto: qat - fix error return code in adf_probe 2022-12-31 13:32:36 +01:00
qce crypto: qce - Fix dma_map_sg error check 2022-08-26 18:50:39 +08:00
rockchip crypto: rockchip - rework by using crypto_engine 2022-12-31 13:32:31 +01:00
stm32 crypto: stm32 - fix reference leak in stm32_crc_remove 2022-03-25 16:21:05 +12:00
ux500 crypto: ux500/hash - drop unexpected word "the" 2022-06-30 15:56:57 +08:00
virtio crypto: virtio - fix memory-leak 2022-09-30 13:57:49 +08:00
vmx crypto: vmx - Fix warning on p8_ghash_alg 2022-07-08 15:21:15 +08:00
xilinx crypto: xilinx: prevent probing on non-xilinx hardware 2022-03-09 15:12:31 +12:00
atmel-aes-regs.h
atmel-aes.c crypto: atmel-aes - Drop if with an always false condition 2022-07-15 16:43:20 +08:00
atmel-authenc.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
atmel-ecc.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
atmel-i2c.c crypto: atmel - Avoid flush_scheduled_work() usage 2022-05-06 18:16:55 +08:00
atmel-i2c.h crypto: atmel - Avoid flush_scheduled_work() usage 2022-05-06 18:16:55 +08:00
atmel-sha-regs.h
atmel-sha.c crypto: atmel-sha - initialize sha_dd while declaring 2022-07-15 16:43:22 +08:00
atmel-sha204a.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel-tdes - initialize tdes_dd while declaring 2022-07-15 16:43:22 +08:00
exynos-rng.c
geode-aes.c crypto: geode - use DEFINE_SPINLOCK() for spinlock 2021-04-16 21:16:31 +10:00
geode-aes.h
hifn_795x.c
img-hash.c crypto: img-hash - Fix variable dereferenced before check 'hdev->req' 2022-12-31 13:32:37 +01:00
ixp4xx_crypto.c ARM: ixp4xx: Drop all common code 2022-02-12 18:20:04 +01:00
Kconfig crypto: rockchip - rework by using crypto_engine 2022-12-31 13:32:31 +01:00
Makefile crypto: aspeed - Add HACE hash driver 2022-08-26 18:50:37 +08:00
mxs-dcp.c crypto: mxs-dcp - Fix scatterlist processing 2022-01-31 11:21:46 +11:00
n2_asm.S
n2_core.c crypto: n2 - fix repeated words in comments 2022-09-02 18:37:23 +08:00
n2_core.h
omap-aes-gcm.c
omap-aes.c crypto: omap-aes - Drop if with an always false condition 2022-07-15 16:43:21 +08:00
omap-aes.h
omap-crypto.c crypto: omap - Avoid redundant copy when using truncated sg list 2021-08-21 15:44:53 +08:00
omap-crypto.h
omap-des.c crypto: omap-des - Drop if with an always false condition 2022-07-15 16:43:21 +08:00
omap-sham.c crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe() 2022-12-31 13:32:36 +01:00
padlock-aes.c
padlock-sha.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
qcom-rng.c crypto: qcom-rng - Fix qcom_rng_of_match unused warning 2022-08-19 18:39:35 +08:00
s5p-sss.c crypto: s5p-sss - Drop if with an always false condition 2022-07-15 16:43:21 +08:00
sa2ul.c crypto: sa2ul - Check engine status before enabling 2022-07-15 16:43:22 +08:00
sa2ul.h crypto: sa2ul - Check engine status before enabling 2022-07-15 16:43:22 +08:00
sahara.c crypto: sahara - Fix error check for dma_map_sg 2022-08-26 18:50:39 +08:00
talitos.c crypto: talitos - Uniform coding style with defined variable 2022-05-13 17:24:49 +08:00
talitos.h crypto: talitos - Work around SEC6 ERRATA (AES-CTR mode data size error) 2021-01-29 15:57:58 +11:00