From e6410cd9c4aa70d22fe23299040622da1bc68d24 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 9 Apr 2014 15:11:47 +0200 Subject: 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 --- 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 eafdc878ac..455b21a1d9 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)); -- cgit v1.2.3