block: fix possible NULL pointer dereference in mount_device()