Messages in this thread | | | Date | Tue, 29 Sep 2015 19:14:55 +0100 | From | Mark Brown <> | Subject | Re: [PATCH 1/2] regmap: debugfs: remove bogus check |
| |
On Tue, Sep 29, 2015 at 12:29:01AM +0200, Rasmus Villemoes wrote: > snprintf cannot return a negative value (unless map->dev->driver->name > happens to be over 2G long). So remove the bogus check.
> ret = snprintf(buf, PAGE_SIZE, "%s\n", map->dev->driver->name); > - if (ret < 0) { > - kfree(buf); > - return ret; > - }
It's hard to see a great value in removing error checking, even error checking that's currently unlikely to ever trigger... [unhandled content-type:application/pgp-signature] | |