mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] devfs-core: return new cdev also for mtd partitions
@ 2014-04-09 20:28 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2014-04-09 20:28 UTC (permalink / raw)
  To: barebox

__devfs_add_partition returns the newly created cdev, but in case
of mtd partitions it accidently returns 0. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 fs/devfs-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index eafdc87..455b21a 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -303,7 +303,7 @@ static struct cdev *__devfs_add_partition(struct cdev *cdev,
 				partinfo->flags, partinfo->name);
 		if (IS_ERR(mtd))
 			return (void *)mtd;
-		return 0;
+		return &mtd->cdev;
 	}
 
 	new = xzalloc(sizeof(*new));
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

only message in thread, other threads:[~2014-04-09 20:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-09 20:28 [PATCH] devfs-core: return new cdev also for mtd partitions Sascha Hauer

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