summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-04-09 15:11:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-04-09 22:27:21 +0200
commite6410cd9c4aa70d22fe23299040622da1bc68d24 (patch)
treeb03805c1dd5b5caeb414f29b0bc5ff2053898c52
parent80bfa0b7cbbe9d749bb8df6d432830c9c928f822 (diff)
downloadbarebox-e6410cd9c4aa70d22fe23299040622da1bc68d24.tar.gz
devfs-core: return new cdev also for mtd partitions
__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>
-rw-r--r--fs/devfs-core.c2
1 files changed, 1 insertions, 1 deletions
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));