From 07f88d1ace08bc7fa1e6538a81dc9808de0535af Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 12 Aug 2022 10:06:51 +0200 Subject: [PATCH] ANDROID: fix up broken dm-table.c out-of-tree code. Changes in 6.0-rc1 broke the out-of-tree dm-table.c changes, so fix things up to be able to build properly again. Bug: 147209885 Bug: 160883266 Bug: 160883801 Fixes: fd35c92fc41d ("ANDROID: dm: add support for passing through derive_sw_secret") Cc: Barani Muthukumaran Cc: Eric Biggers Signed-off-by: Greg Kroah-Hartman Change-Id: I1c66f45414083b3cc9fdb4d17dc9f87f2fd34eb0 --- drivers/md/dm-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index aa065d471836..10e7d74f46e4 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1302,7 +1302,7 @@ static int dm_derive_sw_secret(struct blk_crypto_profile *profile, t = dm_get_live_table(md, &srcu_idx); if (!t) return -EOPNOTSUPP; - for (i = 0; i < dm_table_get_num_targets(t); i++) { + for (i = 0; i < t->num_targets; i++) { ti = dm_table_get_target(t, i); if (!ti->type->iterate_devices) continue;