net: wan: sbni: fix device usage count
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 3 Sep 2015 06:00:30 +0000 (11:30 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Sep 2015 00:32:53 +0000 (17:32 -0700)
commitbd516bd1feeb3890502178a74228ec05271f2b6d
tree24e89e1951cff4c3005e89b3eba56bfd97c83165
parent25b4a44c19c83d98e8c0807a7ede07c1f28eab8b
net: wan: sbni: fix device usage count

dev_get_by_name() will increment the usage count if the matching device
is found. But we were not decrementing the count if we have got the
device and the device is non-active.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/sbni.c