diff options
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r-- | drivers/block/xen-blkfront.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index b6c8ce254359..8f905089b72b 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -977,6 +977,8 @@ static void backend_changed(struct xenbus_device *dev, | |||
977 | break; | 977 | break; |
978 | 978 | ||
979 | case XenbusStateClosing: | 979 | case XenbusStateClosing: |
980 | if (info->gd == NULL) | ||
981 | xenbus_dev_fatal(dev, -ENODEV, "gd is NULL"); | ||
980 | bd = bdget_disk(info->gd, 0); | 982 | bd = bdget_disk(info->gd, 0); |
981 | if (bd == NULL) | 983 | if (bd == NULL) |
982 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); | 984 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); |