]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: microchip: ksz9477: remove unnecessary i2c_set_clientdata()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 23 Sep 2022 14:37:41 +0000 (22:37 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 27 Sep 2022 00:44:28 +0000 (17:44 -0700)
Remove unnecessary i2c_set_clientdata() in ->remove(), the driver_data
will be set to NULL in device_unbind_cleanup() after calling ->remove().

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz9477_i2c.c

index 8fbc122e3384333ca05654ec5fd3a05afd15ae4f..e111756f6473543e670c1ffe84f3f5d5f49cd409 100644 (file)
@@ -59,8 +59,6 @@ static int ksz9477_i2c_remove(struct i2c_client *i2c)
        if (dev)
                ksz_switch_remove(dev);
 
-       i2c_set_clientdata(i2c, NULL);
-
        return 0;
 }