Merge tag 'drm-intel-next-fixes-2015-06-22' of git://anongit.freedesktop.org/drm...
[cascardo/linux.git] / drivers / md / dm-era-target.c
index 414dad4..ad913cd 100644 (file)
@@ -1391,7 +1391,8 @@ static int era_is_congested(struct dm_target_callbacks *cb, int bdi_bits)
 
 static void era_destroy(struct era *era)
 {
-       metadata_close(era->md);
+       if (era->md)
+               metadata_close(era->md);
 
        if (era->wq)
                destroy_workqueue(era->wq);