[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150929181455.GB30445@sirena.org.uk>
Date: Tue, 29 Sep 2015 19:14:55 +0100
From: Mark Brown <broonie@...nel.org>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
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...
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists