diff options
author | 2008-11-09 05:34:47 +0100 | |
---|---|---|
committer | 2008-11-14 18:19:40 -0500 | |
commit | 3e44017b589f001941723dfdfede2ca6284dddce (patch) | |
tree | ddfe46aefebff4ce75b3b9c53fce8dfd2ada3d32 /lib/check_signature.c | |
parent | atl1: Do not enumerate options unsupported by chip (diff) | |
download | wireguard-linux-3e44017b589f001941723dfdfede2ca6284dddce.tar.xz wireguard-linux-3e44017b589f001941723dfdfede2ca6284dddce.zip |
phylib: fix premature freeing of struct mii_bus
Commit 46abc02175b3c246dd5141d878f565a8725060c9 ("phylib: give mdio
buses a device tree presence") added a call to device_unregister() in
a situation where the caller did not intend for the device to be
freed yet, but apart from just unregistering the device from the
system, device_unregister() does an additional put_device() that is
intended to free it.
The right function to use in this situation is device_del(), which
unregisters the device from the system like device_unregister() does,
but without dropping the reference count an additional time.
Bug report from Bryan Wu <cooloney@kernel.org>.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'lib/check_signature.c')
0 files changed, 0 insertions, 0 deletions