If "e" is NULL then "bm_ext" would be NULL too. Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> --- Found by static analysis and compile tested only. Sorry. :/ diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 17956ff..b68b778 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c @@ -1328,7 +1328,7 @@ int drbd_rs_del_all(struct drbd_conf *mdev) for (i = 0; i < mdev->resync->nr_elements; i++) { e = lc_element_by_index(mdev->resync, i); bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL; - if (bm_ext->lce.lc_number == LC_FREE) + if (!bm_ext || bm_ext->lce.lc_number == LC_FREE) continue; if (bm_ext->lce.lc_number == mdev->resync_wenr) { dev_info(DEV, "dropping %u in drbd_rs_del_all, apparently" -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html