stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "devres: fix devres_get()" has been added to the 4.1-stable tree
@ 2015-09-19  3:33 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-09-19  3:33 UTC (permalink / raw)
  To: yamada.masahiro, gregkh, tj; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    devres: fix devres_get()

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     devres-fix-devres_get.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 64526370d11ce8868ca495723d595b61e8697fbf Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Wed, 15 Jul 2015 10:29:00 +0900
Subject: devres: fix devres_get()

From: Masahiro Yamada <yamada.masahiro@socionext.com>

commit 64526370d11ce8868ca495723d595b61e8697fbf upstream.

Currently, devres_get() passes devres_free() the pointer to devres,
but devres_free() should be given with the pointer to resource data.

Fixes: 9ac7849e35f7 ("devres: device resource management")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/base/devres.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -297,10 +297,10 @@ void * devres_get(struct device *dev, vo
 	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;
 }


Patches currently in stable-queue which might be from yamada.masahiro@socionext.com are

queue-4.1/devres-fix-devres_get.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-19  4:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-19  3:33 Patch "devres: fix devres_get()" has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).