linux/drivers/fsi
Jeremy Kerr 371975b0b0 fsi/core: Fix error paths on CFAM init
Change d1dcd67825 re-worked the struct fsi_slave initialisation in
fsi_slave_init, but introduced a few inconsitencies: the slave->dev is
now registered through cdev_device_add, but we may kfree() the device
out from underneath the cdev registration. We may also leave an IDA
allocated.

This change fixes the error paths, so that we kfree() only before the
device is registered with the core code. We also move the smode write to
before we start creating proper devices, as it's the most likely to
fail. We also remove the IDA-allocated minor on error, and properly
clean up the of_node.

Fixes: d1dcd67825 ("fsi: Add cfam char devices")
Reported-by: Lei YU <mine260309@gmail.com>
Tested-by: John Wang <wangzqbj@inspur.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2019-07-03 10:42:53 +09:30
..
cf-fsi-fw.h fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire 2018-07-23 15:22:52 +10:00
fsi-core.c fsi/core: Fix error paths on CFAM init 2019-07-03 10:42:53 +09:30
fsi-master-ast-cf.c fsi: master-ast-cf: Rename dump_trace() to avoid name collision 2018-07-26 14:49:50 +10:00
fsi-master-gpio.c fsi: Move various master definitions to a common header 2018-07-12 12:06:02 +10:00
fsi-master-hub.c fsi: master-hub: Fix sparse warnings 2018-06-18 14:33:56 +10:00
fsi-master.h fsi: Prevent multiple concurrent rescans 2018-07-27 09:58:12 +10:00
fsi-occ.c OCC: FSI and hwmon: Add sequence numbering 2019-07-03 10:41:22 +09:30
fsi-sbefifo.c iov_iter: Separate type from direction and use accessor functions 2018-10-24 00:41:07 +01:00
fsi-scom.c fsi: fsi-scom.c: Remove duplicate header 2018-11-26 10:13:04 +11:00
Kconfig fsi: Add On-Chip Controller (OCC) driver 2018-12-02 16:25:28 -08:00
Makefile fsi: Add On-Chip Controller (OCC) driver 2018-12-02 16:25:28 -08:00