MD: fix null pointer deference
authorShaohua Li <shli@fb.com>
Thu, 28 Jul 2016 16:06:34 +0000 (09:06 -0700)
committerShaohua Li <shli@fb.com>
Thu, 28 Jul 2016 16:06:34 +0000 (09:06 -0700)
commit5d8817833c7609c24da9a92f71c53caa9c1424eb
tree4dbcce4eb6356405d66decd96f12c2c6fcc1d464
parent0e5313e2d4ef93bdf6c22dad647d28635b86472a
MD: fix null pointer deference

The md device might not have personality (for example, ddf raid array). The
issue is introduced by 8430e7e0af9a15(md: disconnect device from personality
before trying to remove it)

Reported-by: kernel test robot <xiaolong.ye@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.c