android_kernel_xiaomi_sm8450/drivers/fsi
Jiasheng Jiang 382a5fc49e fsi: core: Check error number after calling ida_simple_get
[ Upstream commit 35af9fb49bc5c6d61ef70b501c3a56fe161cce3e ]

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 13:25:38 +02:00
..
cf-fsi-fw.h fsi: cf-fsi-fw: Use the correct style for SPDX License Identifier 2019-06-19 19:35:51 +02:00
fsi-core.c fsi: core: Check error number after calling ida_simple_get 2022-10-26 13:25:38 +02:00
fsi-master-aspeed.c fsi: Aspeed: Fix a potential double free 2022-04-08 14:40:23 +02:00
fsi-master-ast-cf.c fsi: Add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:42 +02:00
fsi-master-gpio.c fsi: Add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:42 +02:00
fsi-master-hub.c fsi: master: Constify hub_master_ids 2020-09-10 12:22:50 +09:30
fsi-master.h fsi: master: Add boolean parameter to link_enable function 2020-09-10 12:22:47 +09:30
fsi-occ.c fsi: Add missing MODULE_DEVICE_TABLE 2021-07-20 16:05:42 +02:00
fsi-sbefifo.c fsi/sbefifo: Fix reset timeout 2021-07-14 16:56:41 +02:00
fsi-scom.c fsi: scom: Reset the FSI2PIB engine for any error 2021-07-14 16:56:41 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile fsi: Add ast2600 master driver 2019-11-08 11:28:20 +01:00