This is reasonable to continue directly when count == 0, while this case could be merged in following for loop.
count == 0, j == 0 => j >= count, loop continues. This patch just removes the special handling to make the code look more neat. Signed-off-by: Wei Yang <richardw.y...@linux.intel.com> --- drivers/nvdimm/namespace_devs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index 234c0c79726a..0d64c4b38a56 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -2485,8 +2485,6 @@ static int init_active_labels(struct nd_region *nd_region) count = nd_label_active_count(ndd); dev_dbg(ndd->dev, "count: %d\n", count); - if (!count) - continue; for (j = 0; j < count; j++) { struct nd_namespace_label *label; -- 2.19.1 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm