From: Russell King Date: Thu, 24 Sep 2015 19:36:33 +0000 (+0100) Subject: net: fix net_device refcounting X-Git-Tag: omap-for-v4.3/fixes-rc5~84^2~5^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9861f72074c77a8a065622c1be7e9c4277e600eb;p=pandora-kernel.git net: fix net_device refcounting of_find_net_device_by_node() uses class_find_device() internally to lookup the corresponding network device. class_find_device() returns a reference to the embedded struct device, with its refcount incremented. Add a comment to the definition in net/core/net-sysfs.c indicating the need to drop this refcount, and fix the DSA code to drop this refcount when the OF-generated platform data is cleaned up and freed. Also arrange for the ref to be dropped when handling errors. Signed-off-by: Russell King Signed-off-by: David S. Miller --- Reading git-diff-tree failed