[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170529131346.gsauzllpplc2e7vy@sirena.org.uk>
Date: Mon, 29 May 2017 14:13:46 +0100
From: Mark Brown <broonie@...nel.org>
To: "Alex A. Mihaylov" <minimumlaw@...bler.ru>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sebastian Reichel <sre@...nel.org>,
Evgeniy Polyakov <zbr@...emap.net>,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support
On Sun, May 28, 2017 at 10:11:18AM +0300, Alex A. Mihaylov wrote:
> + int ret = -ENODEV;
> +
> + mutex_lock(&sl->master->bus_mutex);
> + if (!w1_reset_select_slave(sl)) {
> + w1_write_8(sl->master, W1_CMD_READ_DATA);
> + w1_write_8(sl->master, reg);
> + *val = w1_read_8(sl->master);
> + ret = 0;
> + }
I asked you to move the error handling into the else case in these :(
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists