staging: most: net: make net device lifetime obvious
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>
Tue, 20 Jun 2017 15:11:49 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jun 2017 16:32:46 +0000 (00:32 +0800)
commit606c21759774a6694d4219d5bb96704ab13e20a0
treed7e93c137ac9e49c56f552d1ea29f06d3729f57b
parent3c1746edd12d4e3279b47a9fb8dc0eedc77d679d
staging: most: net: make net device lifetime obvious

The function aim_probe_channel calls only one of the functions
alloc_netdev and register_netdev per run.

Correspondingly, the function aim_disconnect_channel calls only one of
the functions unregister_netdev and free_netdev per run.

This patch makes it obvious by using the 'else' part of the 'if'
statement.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-network/networking.c