patch "devres: fix devres_get()" added to driver-core-next
Subsystems (2)
This is a note to let you know that I've just added the patch titled
devres: fix devres_get()
to my driver-core git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
in the driver-core-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
Quoted 1 line
From
64526370d11ce8868ca495723d595b61e8697fbfMon Sep 17 00:00:00 2001
From: Masahiro Yamada <[email protected]>
Date: Wed, 15 Jul 2015 10:29:00 +0900
Subject: devres: fix devres_get()
Currently, devres_get() passes devres_free() the pointer to devres, but devres_free() should be given with the pointer to resource data.
--- drivers/base/devres.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/devres.c +2 -2
@@ -297,10 +297,10 @@ void * devres_get(struct device *dev, void *new_res,if (!dr) {add_dr (dev, &new_dr->node); dr = new_dr; - new_dr =NULL ; + new_res =NULL ; }spin_unlock_irqrestore (&dev->devres_lock, flags); -devres_free (new_dr); +devres_free (new_res);return dr->data; }
Signature · 1 line
2.5.0