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: 09aecfab93b8 ("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>
|
||
|---|---|---|
| .. | ||
| cf-fsi-fw.h | ||
| fsi-core.c | ||
| fsi-master-aspeed.c | ||
| fsi-master-ast-cf.c | ||
| fsi-master-gpio.c | ||
| fsi-master-hub.c | ||
| fsi-master.h | ||
| fsi-occ.c | ||
| fsi-sbefifo.c | ||
| fsi-scom.c | ||
| Kconfig | ||
| Makefile | ||