WSL2-Linux-Kernel/drivers/fsi
Jiasheng Jiang 2f921d62c2 fsi: core: Check error number after calling ida_simple_get
[ Upstream commit 35af9fb49b ]

If allocation fails, the ida_simple_get() will return error number.
So master->idx could be error number and be used in dev_set_name().
Therefore, it should be better to check it and return error if fails,
like the ida_simple_get() in __fsi_get_new_minor().

Fixes: 09aecfab93 ("drivers/fsi: Add fsi master definition")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220111073411.614138-1-jiasheng@iscas.ac.cn
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 12:35:17 +02:00
..
Kconfig
Makefile
cf-fsi-fw.h
fsi-core.c fsi: core: Check error number after calling ida_simple_get 2022-10-26 12:35:17 +02:00
fsi-master-aspeed.c fsi: Aspeed: Fix a potential double free 2022-04-08 14:23:44 +02:00
fsi-master-ast-cf.c
fsi-master-gpio.c
fsi-master-hub.c
fsi-master.h
fsi-occ.c fsi: occ: Force sequence numbering per OCC 2022-07-07 17:53:32 +02:00
fsi-sbefifo.c
fsi-scom.c