bdi_dev_name already performs the same check. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- block/blk-cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 1038688568926e..0b3226cbf3f25d 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -572,7 +572,7 @@ static int blkcg_reset_stats(struct cgroup_subsys_state *css, const char *blkg_dev_name(struct blkcg_gq *blkg) { - if (!blkg->q->disk || !blkg->q->disk->bdi->dev) + if (!blkg->q->disk) return NULL; return bdi_dev_name(blkg->q->disk->bdi); } -- 2.39.0