public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] sysfs fix for 2.6.36-git
@ 2010-09-04  2:09 Greg KH
  2010-09-04  2:12 ` [PATCH 1/1] sysfs: checking for NULL instead of ERR_PTR Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Greg KH @ 2010-09-04  2:09 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here's a single sysfs fix for your 2.6.36-git tree.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git/

This patch has been in the linux-next and mm trees for a bit.

The patch will be sent as a follow-on to this message to lkml for people
to see.

thanks,

greg k-h

------------

 fs/sysfs/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

---------------

Dan Carpenter (1):
      sysfs: checking for NULL instead of ERR_PTR


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] sysfs: checking for NULL instead of ERR_PTR
  2010-09-04  2:09 [GIT PATCH] sysfs fix for 2.6.36-git Greg KH
@ 2010-09-04  2:12 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2010-09-04  2:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dan Carpenter, stable, Greg Kroah-Hartman

From: Dan Carpenter <error27@gmail.com>

d_path() returns an ERR_PTR and it doesn't return NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: stable <stable@kernel.org>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 fs/sysfs/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 1b27b56..da3fefe 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -340,7 +340,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
 	char *p;
 
 	p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file));
-	if (p)
+	if (!IS_ERR(p))
 		memmove(last_sysfs_file, p, strlen(p) + 1);
 
 	/* need attr_sd for attr and ops, its parent for kobj */
-- 
1.7.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-04  2:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-04  2:09 [GIT PATCH] sysfs fix for 2.6.36-git Greg KH
2010-09-04  2:12 ` [PATCH 1/1] sysfs: checking for NULL instead of ERR_PTR Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox