Received: by 10.192.165.156 with SMTP id m28csp898609imm; Fri, 13 Apr 2018 09:41:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Qedz1Q3vDzGUq6ID4j46dD339oof8StErWKDAPz9ZvLWaIZDXfbQUofswKJGby5wMgm4I X-Received: by 10.98.10.23 with SMTP id s23mr12208905pfi.204.1523637677844; Fri, 13 Apr 2018 09:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523637677; cv=none; d=google.com; s=arc-20160816; b=ddWXS5YMXaGMn/VdmoJTtAYMxRvc2ZAKgU4XtshH/kzHGQHYgORrjo3CUB8tc763No s0qApaqRk8uRz1e0iDt1y6NrSqdrUfxRdpaKX7MpPekhRh7itnZoBOkIzv/U5MaP7h/n gfP58jTdxvFpQQ1QXmEZd6JDjxBuJUN6yCgjkMYy0t7sBIDtrmdAjHH8VyGg+Qftyglk gT7iO+C3prg9Us01UOoC39G0MGCX1V+9e4hgncNRvr/1mGlZT0GpU0Dgp0eb460SQmVB V7CVtZtlT/MoAA3MZFvrUJiOVU6IRh/O3vQk3ZZW2B5Ki/KJPnIQNeKhRz5wY0hDIzbM gq3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=AUYcWjSzrPAo1AAFd0fCJjYN3y2sBNkuo6UzBvviTWY=; b=qRuXWf1L3oFAJFecosZeG/V7Z5cwS7uOHrErVSA2nIJC8paY4kRbADj4gAIGgnNUKg xtO0sUULHWUQ/ZDTrHhiD3TOXXKxhzmn7JJzJxwtiBczHAlAyAIwVynRMBtnaIBiN7kR tvqrxZLscvgevJswvJQanbFXWFqDImOVvu6bjrbOU2PTfLjuHaff1I2qgagrrzgcEj2x 22R3IZAttqcsXnuYjDkdNNUhKpJ64V5Xu8AE6aSgIPnt+3LyIMwMorSC1kZ4XP4+8KFX VVjLfPNhZUe22YHPx1qf3mwt0EoiT3fqA8Mv6hRi3aLJXko8mhPhF/0SsYD7kR4xPye1 tb0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=eJn5J1b5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16-v6si6038759plr.141.2018.04.13.09.41.03; Fri, 13 Apr 2018 09:41:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=eJn5J1b5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750940AbeDMQiB (ORCPT + 99 others); Fri, 13 Apr 2018 12:38:01 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:33671 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbeDMQh6 (ORCPT ); Fri, 13 Apr 2018 12:37:58 -0400 Received: by mail-qk0-f195.google.com with SMTP id d206so9736710qkb.0 for ; Fri, 13 Apr 2018 09:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AUYcWjSzrPAo1AAFd0fCJjYN3y2sBNkuo6UzBvviTWY=; b=eJn5J1b5ebCmEQO79s6k0j67Uhq4Bj5WeMByaHWtazssI/8g4UesxtSJC1Wa0cKQBL BFZ/HKILTyoVe28JBySYDUDwBk7yQg5vWVJ3sza0zaObCiO2SgGnX5Vr2cA1sEX7xZdC x35GJ3HnbRf7MfqcrKgauXGhxkWeMafl35P0k+Z7dcOKBso9PgBvsSgVYPrnmJc+VQFp CZDZfblnJJlIVJvMeNO0AEoP/J2dEPW9gL+r2uyDBA3a3IRofox6CErJMIZhLzFCZzXC JLVSojJnlB0khqWgFFOWy0aZoqvLbej1SH7xtDerQtbQ2xxa/+iqp88qEx8J8fP1I7MU odLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AUYcWjSzrPAo1AAFd0fCJjYN3y2sBNkuo6UzBvviTWY=; b=X/giYJHsxDgjSclHQ22os9QYeoqxTfffCcHj2Qh8boTHwWEZ7BDhJJ1CSFFu/38ocU q10x/YN9xIgomSdbuoAfT1EpyTSpoK2F+SF9QwXHcz47/Jvx9u+lJF4Sm5YMPgXdDvNM tKpC2wPw6wmurKZdsqh6CH/3CAptL0e+WlRDOYQfISlYGp6zzjb8k7+g9xOTNeXNOfhU FJw5qIeujBva7k41Qc9PHqBs9G0DVLCwMqDN2BCkGDkvBCdSiq9FTGYBL1Clwo8c9LyH wkQs73Ji6tmrxKVJ0y1EGq/uCs8f8c7MrD/ruZseLmp+13+7/hhjBed7z+61EM9AQLd7 42nQ== X-Gm-Message-State: ALQs6tBDClpVQav25xvLC1XsN7ssbwq3YlM18OVZR24tG574IUZiAl/Q IDYZsDnWOZpagsn8Wix6JPMoQw== X-Received: by 10.55.23.94 with SMTP id i91mr694510qkh.308.1523637476951; Fri, 13 Apr 2018 09:37:56 -0700 (PDT) Received: from localhost.localdomain ([190.210.56.45]) by smtp.gmail.com with ESMTPSA id t82sm5024687qke.52.2018.04.13.09.37.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Apr 2018 09:37:56 -0700 (PDT) From: =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= Subject: [PATCH v2 03/14] staging: iio: ad7746: Fix bound checkings Date: Fri, 13 Apr 2018 13:36:40 -0300 Message-Id: <1523637411-8531-4-git-send-email-hernan@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523637411-8531-1-git-send-email-hernan@vanguardiasur.com.ar> References: <1523637411-8531-1-git-send-email-hernan@vanguardiasur.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Also remove unnecessary parenthesis Signed-off-by: HernĂ¡n Gonzalez --- drivers/staging/iio/cdc/ad7746.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c index 516aa93..d793785 100644 --- a/drivers/staging/iio/cdc/ad7746.c +++ b/drivers/staging/iio/cdc/ad7746.c @@ -458,7 +458,7 @@ static int ad7746_write_raw(struct iio_dev *indio_dev, ret = 0; break; case IIO_CHAN_INFO_CALIBBIAS: - if ((val < 0) | (val > 0xFFFF)) { + if (val < 0 || val > 0xFFFF) { ret = -EINVAL; goto out; } @@ -470,7 +470,7 @@ static int ad7746_write_raw(struct iio_dev *indio_dev, ret = 0; break; case IIO_CHAN_INFO_OFFSET: - if ((val < 0) | (val > 43008000)) { /* 21pF */ + if (val < 0 || val > 43008000) { /* 21pF */ ret = -EINVAL; goto out; } -- 2.7.4