firewire: net: fix NULL derefencing in fwnet_probe()

"dev" and "net" are NULL when alloc_netdev() is failed.
So just unlock and return an error.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

authored by Daeseok Youn and committed by Stefan Richter 1118f8d0 d6d211db

+2 -2
+2 -2
drivers/firewire/net.c
··· 1462 1463 net = alloc_netdev(sizeof(*dev), "firewire%d", fwnet_init_dev); 1464 if (net == NULL) { 1465 - ret = -ENOMEM; 1466 - goto out; 1467 } 1468 1469 allocated_netdev = true;
··· 1462 1463 net = alloc_netdev(sizeof(*dev), "firewire%d", fwnet_init_dev); 1464 if (net == NULL) { 1465 + mutex_unlock(&fwnet_device_mutex); 1466 + return -ENOMEM; 1467 } 1468 1469 allocated_netdev = true;