Commit 440ae6f0 authored by Wolfram Sang's avatar Wolfram Sang Committed by Andi Shyti
Browse files

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent 9d895519
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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)