summaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2019-06-28 11:07:37 +0300
committerJoel Stanley <joel@jms.id.au>2019-07-02 08:47:55 +0300
commitd83aec28b086ee676056638d77ac93b06ec3d4b1 (patch)
treedea8d321d8b009319ece0120d59e740d6bc479d9 /lib/memory-notifier-error-inject.c
parent2d894b9c0b96420d1426bf2d18c73bcd6ac57336 (diff)
downloadlinux-d83aec28b086ee676056638d77ac93b06ec3d4b1.tar.xz
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. OpenBMC-Staging-Count: 1 Fixes: d1dcd6782576 ("fsi: Add cfam char devices") Reported-by: Lei YU <mine260309@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Tested-by: John Wang <wangzqbj@inspur.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions