From patchwork Mon Jun 14 20:26:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Justin P. Mattock" X-Patchwork-Id: 3653 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Mon, 14 Jun 2010 20:29:26 +0000 Received: from bombadil.infradead.org [18.85.46.34] by localhost with IMAP (fetchmail-6.3.17) for (single-drop); Tue, 15 Jun 2010 07:59:48 +0300 (EEST) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OOGHd-00053T-QW; Mon, 14 Jun 2010 20:29:26 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756005Ab0FNU2M (ORCPT + 1 other); Mon, 14 Jun 2010 16:28:12 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:52855 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755745Ab0FNU04 (ORCPT ); Mon, 14 Jun 2010 16:26:56 -0400 Received: by pvg16 with SMTP id 16so3067678pvg.19 for ; Mon, 14 Jun 2010 13:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=vAeEAVPIC+JLLL7ucMt7CmWsP4mdHL9Ud3pHB7ZWL3M=; b=ZIpBUDfS2v7cvoXK0TnEykNo0U936r4kPdwBUYLtgGrVQeQQcwe46yeENuYzZ7YazY VYkl5lFi67riFp/rI1j6OJXUuJA4Nto7NSGfqE9G1WkibEnyWks2BwF7xP0BoBk6oABJ W42GhWOujFDH2UWW+23c/uVpB1RefNsgGQT+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=balXRRKzb2RoRnlc+ZIqG18EC6+Ie4O92chpRmZuqk8qmcGRbqQVrEnv8BPvh+7Agd pnQp1W01sO39aFTsNI07NlDQeTOxiSIUzyzdTggY7ThyFgCaaR1H9mqbhO8TcP4K0G1c eFl7bGhztRvBMXNfNYqb3IJEj3t9qeCjl9F7U= Received: by 10.115.102.16 with SMTP id e16mr4917321wam.117.1276547215544; Mon, 14 Jun 2010 13:26:55 -0700 (PDT) Received: from localhost.localdomain ([76.91.45.220]) by mx.google.com with ESMTPS id r20sm58982854wam.5.2010.06.14.13.26.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Jun 2010 13:26:55 -0700 (PDT) From: "Justin P. Mattock" To: linux-kernel@vger.kernel.org Cc: reiserfs-devel@vger.kernel.org, linux-bluetooth@vger.kernel.org, clemens@ladisch.de, debora@linux.vnet.ibm.com, dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, linux1394-devel@lists.sourceforge.net, linux-media@vger.kernel.org, "Justin P. Mattock" Subject: [PATCH 4/8]drivers:tmp.c Fix warning: variable 'rc' set but not used Date: Mon, 14 Jun 2010 13:26:44 -0700 Message-Id: <1276547208-26569-5-git-send-email-justinmattock@gmail.com> X-Mailer: git-send-email 1.7.1.rc1.21.gf3bd6 In-Reply-To: <1276547208-26569-1-git-send-email-justinmattock@gmail.com> References: <1276547208-26569-1-git-send-email-justinmattock@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Im getting this warning when compiling: CC drivers/char/tpm/tpm.o drivers/char/tpm/tpm.c: In function 'tpm_gen_interrupt': drivers/char/tpm/tpm.c:508:10: warning: variable 'rc' set but not used The below patch gets rid of the warning, but I'm not sure if it's the best solution. Signed-off-by: Justin P. Mattock --- drivers/char/tpm/tpm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 05ad4a1..3d685dc 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -514,6 +514,8 @@ void tpm_gen_interrupt(struct tpm_chip *chip) rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, "attempting to determine the timeouts"); + if (!rc) + rc = 0; } EXPORT_SYMBOL_GPL(tpm_gen_interrupt);