hsi: fix double kfree
PATCH v2 1/1 hsi: fix double kfree
When device_register() fails, kfree() is called in hsi_client_release(), hence there is no need to call kfree in err3 again.
Signed-off-by Geliang Tang <[email protected]>
---
Changes in v2:
- Just to make myself clearer that what I did in this patch.
--- drivers/hsi/hsi.c | 1 - 1 file changed, 1 deletion(-)
drivers/hsi/hsi.c +0 -1
@@ -300,7 +300,6 @@ static void hsi_add_client_from_dt(struct hsi_port *port,if (device_register (&cl->device) <0 ) {pr_err ("hsi: failed to register client: %s\n" , name);put_device (&cl->device); - goto err3; }return ;
Signature · 1 line
2.5.0
Sebastian Reichel
maintainerHi,
Quoted 2 lines · Geliang Tang
When
device_register()fails,kfree()is called inhsi_client_release(), hence there is no need to call kfree in err3 again.
Thanks, queued.
-- Sebastian