Re: [PATCH 1/1] char: ipmi: convert to use i2c_new_client_device()

Wolfram Sang
2020-05-13T07:10:19Z

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

> > - addr_info->added_client = i2c_new_device(to_i2c_adapter(adev),
> > - &addr_info->binfo);
> > + addr_info->added_client = i2c_new_client_device(to_i2c_adapter(adev),
> > + &addr_info->binfo);
>
> i2c_new_client_device returns an ERR_PTR, not NULL on error. So this

Yes, this is the main motivation for the new API.

> needs some more work. I'll send something out soon.

Why does it need that work? 'added_client' is only used with
i2c_unregister_device() which has been fixed to handle ERR_PTR as well.
Or am I missing something?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]