lkml.org 
[lkml]   [2015]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2015-09-29 20:41    [W:0.152 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site