blockdev: check dinfo ptr before using