summaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_framereg.c
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2019-12-22 11:26:15 +0000
committerDavid S. Miller <davem@davemloft.net>2019-12-25 16:35:35 -0800
commit1d19e2d53e8ed9e4c98fc95e0067492cda7288b0 (patch)
treedb9596fecf5104cdc6d5e89c531ad763ef87c624 /net/hsr/hsr_framereg.c
parent84bb59d773853bc2dda2ac1ef8474c40eb33a3c6 (diff)
downloadlinux-stable-1d19e2d53e8ed9e4c98fc95e0067492cda7288b0.tar.gz
linux-stable-1d19e2d53e8ed9e4c98fc95e0067492cda7288b0.tar.bz2
linux-stable-1d19e2d53e8ed9e4c98fc95e0067492cda7288b0.zip
hsr: fix error handling routine in hsr_dev_finalize()
hsr_dev_finalize() is called to create new hsr interface. There are some wrong error handling codes. 1. wrong checking return value of debugfs_create_{dir/file}. These function doesn't return NULL. If error occurs in there, it returns error pointer. So, it should check error pointer instead of NULL. 2. It doesn't unregister interface if it fails to setup hsr interface. If it fails to initialize hsr interface after register_netdevice(), it should call unregister_netdevice(). 3. Ignore failure of creation of debugfs If creating of debugfs dir and file is failed, creating hsr interface will be failed. But debugfs doesn't affect actual logic of hsr module. So, ignoring this is more correct and this behavior is more general. Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.") Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_framereg.c')
0 files changed, 0 insertions, 0 deletions