Re: [PULL REQUEST] i2c for 3.9
From: Linus Torvalds
Date: Tue Feb 26 2013 - 12:54:45 EST
On Mon, Feb 25, 2013 at 12:27 PM, Wolfram Sang <wsa@xxxxxxxxxxxxx> wrote:
>
> here are the changes for the i2c subsystem for 3.9. Highlights:
> ....
> In addition, there is the usual bunch of fixes, cleanups, devm_*
> conversions, etc. Please pull.
Pulled, but when doing the conflict resolution, I noted that at least
one devm_* conversion had been done incorrectly. It's an older one,
but then there were changes to the area that made it conflict, and
Inotied.
These three lines have two separate bugs in them:
i2c->regs = devm_request_and_ioremap(&pdev->dev, res);
if (i2c->regs == NULL) {
dev_err(&pdev->dev, "cannot request and map IO\n");
The bugs are:
(a) the error case for devm_request_and_ioremap() doesn't return NULL
(b) dev_err() is very wrong, since one of the whole points of devm_*
is that it already prints out errors for the error case.
There have been other complaints about the mindless devm_* conversion
lately (it changes the order of deallocations which can be deadly), so
please please *please* be more careful about these kinds of "trivial"
patches.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/