lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] char: ipmi: convert to use i2c_new_client_device()
On Wed, May 13, 2020 at 09:10:04AM +0200, Wolfram Sang wrote:
>
> > > - 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?
>

No, I didn't look to see if i2c_unregister_device could handle that.

-corey

\
 
 \ /
  Last update: 2020-05-13 14:30    [W:0.078 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site