Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1652523

Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support
Date 2017-05-29 15:20 +0200
Message-ID <tMsKu-oh-19@gated-at.bofh.it> (permalink)
References <tM0Ex-7eT-3@gated-at.bofh.it> <tM0Ey-7eT-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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 :(

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] regmap: Add OneWire (W1) bus support "Alex A. Mihaylov" <minimumlaw@rambler.ru> - 2017-05-28 09:20 +0200
  Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support Mark Brown <broonie@kernel.org> - 2017-05-29 15:20 +0200
    Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support "Alex A. Mihaylov" <minimumlaw@rambler.ru> - 2017-05-29 18:40 +0200
      Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support Mark Brown <broonie@kernel.org> - 2017-05-30 14:00 +0200
  Re: [PATCH 1/3] regmap: Add OneWire (W1) bus support Geert Uytterhoeven <geert@linux-m68k.org> - 2017-05-29 17:10 +0200

csiph-web