commit | 6fe4c590313133ebd5dadb769031489ff178ece1 | [log] [tgz] |
---|---|---|
author | Frank Li <Frank.Li@freescale.com> | Tue Oct 26 11:02:19 2010 +0800 |
committer | David Woodhouse <David.Woodhouse@intel.com> | Sat Oct 30 12:30:50 2010 +0100 |
tree | 7fad4ea814e69270869a08cfeb727ed616224765 | |
parent | 6411bf6cdfe9b444bc3aa0c23f8cf35460d69432 [diff] |
MTD: Fix wrong check register_blkdev return value register_blkdev return 1..255 when major = 0. if (ret ) { printk(KERN_WARNING "Unable to register %s block device on major %d: %d\n", tr->name, tr->major, ret); mutex_unlock(&mtd_table_mutex); return ret; } Above code will return fail when register_blkdev return allocated major number. Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>