Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbcL3Sqo (ORCPT ); Fri, 30 Dec 2016 13:46:44 -0500 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:52699 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbcL3Sqn (ORCPT ); Fri, 30 Dec 2016 13:46:43 -0500 Subject: Re: [PATCHv4 4/8] Fix braces not present on all arms of if else statement To: Scott Matheina , linux-kernel@vger.kernel.org References: <1482696216-8013-1-git-send-email-scott@matheina.com> <1482696216-8013-5-git-send-email-scott@matheina.com> Cc: Hartmut Knaack , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, devel@driverdev.osuosl.org From: Jonathan Cameron Message-ID: <9e9dafdc-1687-9392-5087-a2b846804b7d@kernel.org> Date: Fri, 30 Dec 2016 18:46:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1482696216-8013-5-git-send-email-scott@matheina.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 947 Lines: 29 On 25/12/16 19:56, Scott Matheina wrote: > Adds braces to second arm of if else statement. > > Signed-off-by: Scott Matheina This patch is actually correct so applied to the togreg branch of iio.git. Thanks, Jonathan > --- > drivers/staging/iio/addac/adt7316.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c > index 2b584a0..e78d302 100644 > --- a/drivers/staging/iio/addac/adt7316.c > +++ b/drivers/staging/iio/addac/adt7316.c > @@ -661,8 +661,9 @@ static ssize_t adt7316_store_da_high_resolution(struct device *dev, > chip->dac_bits = 12; > else if (chip->id == ID_ADT7317 || chip->id == ID_ADT7517) > chip->dac_bits = 10; > - } else > + } else { > config3 = chip->config3 & (~ADT7316_DA_HIGH_RESOLUTION); > + } > > ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG3, config3); > if (ret) >