9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2014-04-09 15:11:47 +02:00
parent 80bfa0b7cb
commit e6410cd9c4
1 changed files with 1 additions and 1 deletions

View File

@ -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));