lkml.org 
[lkml]   [2017]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/5] i2c: pca-platform: add devicetree awareness
On Mon, Jun 26, 2017 at 12:44:32PM +1200, Chris Packham wrote:
> Allow devices that use this driver to be registered via a
> devicetree.
>
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

...

> + if (IS_ERR(i2c->gpio))
> + return PTR_ERR(i2c->gpio);

coccicheck reported:

drivers/i2c/busses/i2c-pca-platform.c:209:3-9: ERROR: missing iounmap; ioremap on line 170 and execution via conditional on line 208

I fixed it like this (incremental diff):

- if (IS_ERR(i2c->gpio))
- return PTR_ERR(i2c->gpio);
+ if (IS_ERR(i2c->gpio)) {
+ ret = PTR_ERR(i2c->gpio);
+ goto e_reqirq;
+ }

and applied to for-next, thanks!

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-06-27 21:55    [W:0.182 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site