mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
mctp i2c: drop check because i2c_unregister_device() is NULL safe
No need to check the argument of i2c_unregister_device() because the function itself does it. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20241202082713.9719-1-wsa+renesas@sang-engineering.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
b32913a560
commit
e8e7be7d21
|
|
@ -177,8 +177,7 @@ static struct mctp_i2c_client *mctp_i2c_new_client(struct i2c_client *client)
|
|||
return mcli;
|
||||
err:
|
||||
if (mcli) {
|
||||
if (mcli->client)
|
||||
i2c_unregister_device(mcli->client);
|
||||
i2c_unregister_device(mcli->client);
|
||||
kfree(mcli);
|
||||
}
|
||||
return ERR_PTR(rc);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user