From patchwork Fri Aug 14 10:17:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 7013891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D66859F358 for ; Fri, 14 Aug 2015 10:20:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C720204AB for ; Fri, 14 Aug 2015 10:20:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38153206F9 for ; Fri, 14 Aug 2015 10:20:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZQC3Z-0002u3-Db; Fri, 14 Aug 2015 10:17:49 +0000 Received: from mail-wi0-f179.google.com ([209.85.212.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZQC3W-0002lO-AC for linux-arm-kernel@lists.infradead.org; Fri, 14 Aug 2015 10:17:47 +0000 Received: by wibhh20 with SMTP id hh20so15573296wib.0 for ; Fri, 14 Aug 2015 03:17:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RCebAapi7mYhz8C5HVLevqBFJoPHrrrIA6gVnvFXWF4=; b=ifrme+1bgU4elXLgrjJM/LmQllvTPQM1/SruOCJQ9KEc/bAVz9yFfc8bj+VjnwrGMR Fbfz8Sfx93JPt/JzKv7AjdjK/rK/oeqoMTHvPvyZFhL3F/PxSaPQjhRRWJjYM7lHyqQR ENDiaejevj5r4iMpq1pQTTFhaUQUHU8mO+PcZMO7mvNBL1oiMsXAaU+3ZW1YMIf3h+Ek e3Cj7GYbHkM1MBECM77OwfeRRWDNrk9ke5tuUaoKRLqHrdQcqsm+FzwfyFHNspOQwguQ gmr1OPaeRnhznDcy9e55t61pNu/P9xW+SAkUnmW+o69vVQIi6JpChyJm8WGzYgJ0zfSX qbJA== X-Gm-Message-State: ALoCoQkV9aSfkd9tmOxguPkxhsoKP6IQOJQdkh/MWkAd6mcDeJ4ESD5XOOkjPlCA2weiV5PfHUuQ X-Received: by 10.180.160.210 with SMTP id xm18mr5000765wib.93.1439547443512; Fri, 14 Aug 2015 03:17:23 -0700 (PDT) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id s1sm2340765wix.13.2015.08.14.03.17.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 03:17:22 -0700 (PDT) From: Srinivas Kandagatla To: Greg Kroah-Hartman Subject: [PATCH] nvmem: core: fix a copy paste error Date: Fri, 14 Aug 2015 11:17:18 +0100 Message-Id: <1439547438-4512-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150814_031746_521234_3B55C7FD X-CRM114-Status: GOOD ( 12.34 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Srinivas Kandagatla , dan.carpenter@oracle.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes a copy paste error in a check which is performed to determine if the cell is specified in bits or not. This warning was picked-up by a static checker. Reported-by: Dan Carpenter Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 35a42bb..ea0d6fd 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -825,7 +825,7 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem, return rc; /* shift bits in-place */ - if (cell->bit_offset || cell->bit_offset) + if (cell->bit_offset || cell->nbits) nvmem_shift_read_buffer_in_place(cell, buf); *len = cell->bytes;