summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-01-11 11:23:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-11 11:23:25 -0800
commit46a67e764884878b61007c9cea40295d02a24fe1 (patch)
tree750f91b0c4d209c048df10a3eba66b794783c18f
parent039053c11965a33250e75009e37dab8e7580fa4e (diff)
parenta1ee1c08fcd5af03187dcd41dcab12fd5b379555 (diff)
Merge tag 'hsi-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
Pull HSI update from Sebastian Reichel: - avoid returning free'd object in hsi_new_client error path * tag 'hsi-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: core: Fix return freed object in hsi_new_client
-rw-r--r--drivers/hsi/hsi_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hsi/hsi_core.c b/drivers/hsi/hsi_core.c
index ec90713564e3..884066109699 100644
--- a/drivers/hsi/hsi_core.c
+++ b/drivers/hsi/hsi_core.c
@@ -102,6 +102,7 @@ struct hsi_client *hsi_new_client(struct hsi_port *port,
if (device_register(&cl->device) < 0) {
pr_err("hsi: failed to register client: %s\n", info->name);
put_device(&cl->device);
+ goto err;
}
return cl;