Re: [PATCH net] net: dsa: Do not destroy invalid network devices

2017-02-08 Thread David Miller
From: Florian Fainelli Date: Tue, 7 Feb 2017 23:10:13 -0800 > dsa_slave_create() can fail, and dsa_user_port_unapply() will properly check > for the network device not being NULL before attempting to destroy it. We were > not setting the slave network device as NULL if dsa_slave_create() failed,

[PATCH net] net: dsa: Do not destroy invalid network devices

2017-02-07 Thread Florian Fainelli
dsa_slave_create() can fail, and dsa_user_port_unapply() will properly check for the network device not being NULL before attempting to destroy it. We were not setting the slave network device as NULL if dsa_slave_create() failed, so we would later on be calling dsa_slave_destroy() on a now free'd