• Jean Delvare's avatar
    [PATCH] I2C: Check for unregistered adapter in i2c_del_adapter · 15e594a8
    Jean Delvare authored
    The patch adds a check at the beginning of i2c_del_adapter in case
    someone attempts to remove an adapter that was never added in the first
    place. This sounds like a good safety, as doing so will lead to an oops
    at the moment. Also, I have a need for it in the latest version of my
    i2c-amd756-s4882 patch. I need to remove the original adapter and
    install the virtual ones instead, but I have no way to know if the
    original adapter was succesfully added beforehand or not.
    Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    15e594a8
i2c-core.c 33.8 KB