kernel_samsung_a53x/drivers/mmc/core
Dan Carpenter b70b468ec3 mmc: mmc_test: Fix NULL dereference on allocation failure
[ Upstream commit a1e627af32ed60713941cbfc8075d44cad07f6dd ]

If the "test->highmem = alloc_pages()" allocation fails then calling
__free_pages(test->highmem) will result in a NULL dereference.  Also
change the error code to -ENOMEM instead of returning success.

Fixes: 2661081f5ab9 ("mmc_test: highmem tests")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/8c90be28-67b4-4b0d-a105-034dc72a0b31@stanley.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:49 +01:00
..
block.c mmc: core: Avoid negative index with array access 2024-11-19 09:22:42 +01:00
block.h
bus.c
bus.h
card.h
core.c mmc: Disable crc check 2024-11-19 17:47:04 +01:00
core.h
crypto.c
crypto.h
debugfs.c
host.c mmc: core: Do not force a retune before RPMB switch 2024-11-19 12:27:11 +01:00
host.h
Kconfig
Makefile
mmc.c mmc: core: Fix eMMC initialization with 1-bit bus connection 2024-11-18 23:18:29 +01:00
mmc_ops.c mmc: block: Be sure to wait while busy in CQE error recovery 2024-11-18 12:11:47 +01:00
mmc_ops.h mmc: block: Be sure to wait while busy in CQE error recovery 2024-11-18 12:11:47 +01:00
mmc_test.c mmc: mmc_test: Fix NULL dereference on allocation failure 2024-11-23 23:20:49 +01:00
pwrseq.c
pwrseq.h
pwrseq_emmc.c
pwrseq_sd8787.c
pwrseq_simple.c
queue.c
queue.h
quirks.h
regulator.c mmc: core: add helpers mmc_regulator_enable/disable_vqmmc 2024-11-18 12:11:17 +01:00
sd.c
sd.h
sd_ops.c
sd_ops.h
sdio.c
sdio_bus.c
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c
sdio_irq.c
sdio_ops.c
sdio_ops.h
sdio_uart.c
slot-gpio.c mmc: core: Add mmc_gpiod_set_cd_config() function 2024-11-19 12:27:18 +01:00
slot-gpio.h