• Neil Brown's avatar
    Fix error paths if md_probe fails. · 9bbbca3a
    Neil Brown authored
    md_probe can fail (e.g. alloc_disk could fail) without
    returning an error (as it alway returns NULL).
    So when we call mddev_find immediately afterwards, we need
    to check that md_probe actually succeeded.  This means checking
    that mdev->gendisk is non-NULL.
    
    cc: <stable@kernel.org>
    Cc: Dave Jones <davej@redhat.com>
    Signed-off-by: default avatarNeil Brown <neilb@suse.de>
    9bbbca3a
md.c 155 KB