summaryrefslogtreecommitdiffstats
path: root/drivers/atm/idt77252.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2013-11-19 11:09:27 +0100
committerDavid S. Miller <davem@davemloft.net>2013-11-19 21:53:02 +0100
commitb5de4a22f157ca345cdb3575207bf46402414bc1 (patch)
treec88e8ec5f27650e3b5ca593e83f6d037cbf57afa /drivers/atm/idt77252.c
parentxfrm: Release dst if this dst is improper for vti tunnel (diff)
downloadlinux-b5de4a22f157ca345cdb3575207bf46402414bc1.tar.xz
linux-b5de4a22f157ca345cdb3575207bf46402414bc1.zip
atm: idt77252: fix dev refcnt leak
init_card() calls dev_get_by_name() to get a network deceive. But it doesn't decrease network device reference count after the device is used. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/idt77252.c')
-rw-r--r--drivers/atm/idt77252.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 272f00927761..1bdf104e90bb 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3511,7 +3511,7 @@ static int init_card(struct atm_dev *dev)
tmp = dev_get_by_name(&init_net, tname); /* jhs: was "tmp = dev_get(tname);" */
if (tmp) {
memcpy(card->atmdev->esi, tmp->dev_addr, 6);
-
+ dev_put(tmp);
printk("%s: ESI %pM\n", card->name, card->atmdev->esi);
}
/*