mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
i2c: keba: 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> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
This commit is contained in:
parent
9d89551994
commit
440ae6f030
|
|
@ -464,12 +464,8 @@ static void ki2c_unregister_devices(struct ki2c *ki2c)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ki2c->client_size; i++) {
|
||||
struct i2c_client *client = ki2c->client[i];
|
||||
|
||||
if (client)
|
||||
i2c_unregister_device(client);
|
||||
}
|
||||
for (i = 0; i < ki2c->client_size; i++)
|
||||
i2c_unregister_device(ki2c->client[i]);
|
||||
}
|
||||
|
||||
static int ki2c_register_devices(struct ki2c *ki2c)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user