Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wolfram Sang and committed by
Andi Shyti
440ae6f0 9d895519

+2 -6
+2 -6
drivers/i2c/busses/i2c-keba.c
··· 464 464 { 465 465 int i; 466 466 467 - for (i = 0; i < ki2c->client_size; i++) { 468 - struct i2c_client *client = ki2c->client[i]; 469 - 470 - if (client) 471 - i2c_unregister_device(client); 472 - } 467 + for (i = 0; i < ki2c->client_size; i++) 468 + i2c_unregister_device(ki2c->client[i]); 473 469 } 474 470 475 471 static int ki2c_register_devices(struct ki2c *ki2c)