diff --git a/drivers/md/dm-bio-prison-v1.c b/drivers/md/dm-bio-prison-v1.c index 9fb5e3f66e6b..c4c05d5d8909 100644 --- a/drivers/md/dm-bio-prison-v1.c +++ b/drivers/md/dm-bio-prison-v1.c @@ -433,7 +433,7 @@ static int __init dm_bio_prison_init(void) return 0; - bad: +bad: while (i--) _exits[i](); diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index 28da60c23f8a..dc2df76999b0 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -66,7 +66,7 @@ struct dm_io_client *dm_io_client_create(void) return client; - bad: +bad: mempool_exit(&client->pool); kfree(client); return ERR_PTR(ret); diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index e5bdfb3b4049..3e622dcc9dbd 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c @@ -65,7 +65,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) ti->private = lc; return 0; - bad: +bad: kfree(lc); return ret; } diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index c90a8a7fb022..cf9402064aba 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -1342,7 +1342,7 @@ static int dmz_load_sb(struct dmz_metadata *zmd) if (ret == -EINVAL) goto out_kfree; } - out_kfree: +out_kfree: kfree(sb); } return ret;