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

Commit 47cae1e1 authored by Max Kellermann's avatar Max Kellermann Committed by Mauro Carvalho Chehab
Browse files

[media] drivers/media/rc: postpone kfree(rc_dev)



CONFIG_DEBUG_KOBJECT_RELEASE found this bug.

Signed-off-by: default avatarMax Kellermann <max@duempel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent acc37e8f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1263,6 +1263,9 @@ static ssize_t store_filter(struct device *device,

static void rc_dev_release(struct device *device)
{
	struct rc_dev *dev = to_rc_dev(device);

	kfree(dev);
}

#define ADD_HOTPLUG_VAR(fmt, val...)					\
@@ -1384,7 +1387,9 @@ void rc_free_device(struct rc_dev *dev)

	put_device(&dev->dev);

	kfree(dev);
	/* kfree(dev) will be called by the callback function
	   rc_dev_release() */

	module_put(THIS_MODULE);
}
EXPORT_SYMBOL_GPL(rc_free_device);