summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2019-06-28 16:07:37 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-27 14:51:00 +0100
commit67a358b01e2edfd824360e8c366b819f0756f79d (patch)
treea1bc436bc615422e398e02da04df1647194df88e /lib
parent1b7081bff268184c82cb811be1cacb9d82dac7a3 (diff)
fsi/core: Fix error paths on CFAM init
[ Upstream commit 371975b0b07520c85098652d561639837a60a905 ] 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: d1dcd6782576 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions