lkml.org 
[lkml]   [2020]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 1/2] i2c: smbus: add core function handling SMBus host-notify

    > > +void i2c_free_slave_host_notify_device(struct i2c_client *client)
    > > +{
    > > + i2c_slave_unregister(client);
    > > + kfree(client->dev.platform_data);
    > > + i2c_unregister_device(client);
    > > +}
    > > +EXPORT_SYMBOL_GPL(i2c_free_slave_host_notify_device);
    >
    > Sidenote: With my recent series "i2c: slave: improve sanity checks when
    > un-/registering" this code became NULL-safe (and IS_ERR safe, too).

    Stupid me, it is not NULL safe. The functions are. But, we deregister
    'client' on our own. It probably makes sense to add some sanity checking
    of the parameters of the exported functions.

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2020-07-26 15:37    [W:2.561 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site