diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2021-05-17 10:47:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-17 15:27:22 -0700 |
commit | 444d7be9532dcfda8e0385226c862fd7e986f607 (patch) | |
tree | 61d9d9581696473a934cf6bb16b31c175eddf211 /net/9p | |
parent | 35d96e631860226d5dc4de0fad0a415362ec2457 (diff) |
net/smc: remove device from smcd_dev_list after failed device_add()
If the device_add() for a smcd_dev fails, there's no cleanup step that
rolls back the earlier list_add(). The device subsequently gets freed,
and we end up with a corrupted list.
Add some error handling that removes the device from the list.
Fixes: c6ba7c9ba43d ("net/smc: add base infrastructure for SMC-D and ISM")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/9p')
0 files changed, 0 insertions, 0 deletions