]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
md: check the return of mddev_find()
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 22 May 2012 03:55:32 +0000 (13:55 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 22 May 2012 03:55:32 +0000 (13:55 +1000)
commit0c098220e2320c1f0c9339d0ff05c5e04672133a
tree5dfe163da6707f93b5bbc77ccb0ec4ee98227591
parent4f0a5e012cf41321d611e7cad63e1017d143d138
md: check the return of mddev_find()

Check the return of mddev_find(), since it may fail due to out of
memeory or out of usable minor number.

The reason I chose -ENODEV instead of -ENOMEM or something else is
md_alloc() function chose that ;)

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c