Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 141f6363 authored by Mayank Rana's avatar Mayank Rana
Browse files

u_qc_ether: Decrement rndis network device count



Currently rndis0 network device count is being incremented in
rndis_qc_set_alt() when taking reference to netdev related to
rndis0 by using gether_qc_get_net() API. As this reference count
is not being decremented, rndis0 netdevice is not being released.
This fails composition change while changing from RNDIS based one
to default composition. Fix this refcount mismatch by decrementing
the same in gether_qc_get_net() API.

CRs-Fixed: 611543
Change-Id: I74fe5bbe6d81ab3e9a3703711ebd4d4afc8310b7
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent ce80330c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 * Copyright (C) 2003-2005,2008 David Brownell
 * Copyright (C) 2003-2004 Robert Schwebel, Benedikt Spranger
 * Copyright (C) 2008 Nokia Corporation
 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
@@ -355,6 +355,11 @@ struct net_device *gether_qc_get_net(const char *netname)
	if (!net_dev)
		return ERR_PTR(-EINVAL);

	/*
	 * Decrement net_dev refcount as it was incremented in
	 * dev_get_by_name().
	 */
	dev_put(net_dev);
	return net_dev;
}
/**