From patchwork Thu Aug 28 13:14:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 36195 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E4B032054F for ; Thu, 28 Aug 2014 13:14:37 +0000 (UTC) Received: by mail-oi0-f69.google.com with SMTP id i138sf7094409oig.8 for ; Thu, 28 Aug 2014 06:14:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=F965voqxzxesPv1qOdjAuQ1JQWuRkunMGU8NgK5uyy4=; b=m5lVpC2lwAngZA2LWSG9gMH9AMVRy+S0UpJYHrydMrnCIiPxMJ2OLqVXKKVeNbOm6g b/XTzfhumMsW6swyGXDP5KQ5iiL2XWAKUR7aTu6xeSmh3KxJAUWcJgVbrwkQnQZe6p6b zUZqMsPgNzFKekh4p75Uz75iVoh9mWPMB7wunVGHSrTdqScFOnpnW4yTI34OaNGFkGCH X2X2bqEpJieFdQVMUK/nfjZEGOPmBfr4kn/O5zIk+kr7XbdScgeBFi2KQaoHOU+KeGBz 5HG0Y03YMZ/oEMlBKZqAg+sHOdt4FB37GAHOL3RDCkV2aeQPUxd520z+mzjMB3oD74Z5 rZ/A== X-Gm-Message-State: ALoCoQl24DOJM1Uw7z2bNdS0zFz1F+eSxPhgWdGb+tVu8ty/94k7UJ5oY52kqqTS/g5jkepUFbJt X-Received: by 10.50.136.194 with SMTP id qc2mr21798741igb.7.1409231677503; Thu, 28 Aug 2014 06:14:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.148 with SMTP id 20ls560477qgt.86.gmail; Thu, 28 Aug 2014 06:14:37 -0700 (PDT) X-Received: by 10.52.249.66 with SMTP id ys2mr572696vdc.41.1409231677415; Thu, 28 Aug 2014 06:14:37 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id wv12si3364956vcb.21.2014.08.28.06.14.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ij19so750294vcb.40 for ; Thu, 28 Aug 2014 06:14:37 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr2442394vdb.27.1409231677352; Thu, 28 Aug 2014 06:14:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp234634vcb; Thu, 28 Aug 2014 06:14:37 -0700 (PDT) X-Received: by 10.43.164.130 with SMTP id ms2mr4469866icc.9.1409231676835; Thu, 28 Aug 2014 06:14:36 -0700 (PDT) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) by mx.google.com with ESMTPS id il10si7998547igb.6.2014.08.28.06.14.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.223.175 as permitted sender) client-ip=209.85.223.175; Received: by mail-ie0-f175.google.com with SMTP id y20so917790ier.34 for ; Thu, 28 Aug 2014 06:14:36 -0700 (PDT) X-Received: by 10.42.216.135 with SMTP id hi7mr4458978icb.12.1409231676601; Thu, 28 Aug 2014 06:14:36 -0700 (PDT) Received: from localhost.localdomain (host86-152-0-170.range86-152.btcentralplus.com. [86.152.0.170]) by mx.google.com with ESMTPSA id w8sm16633672igl.13.2014.08.28.06.14.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 06:14:36 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Lee Jones Subject: [PATCH 04/11] mfd: htc-i2cpld: container_of() cannot return NULL Date: Thu, 28 Aug 2014 14:14:10 +0100 Message-Id: <1409231657-18294-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> References: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return; Remove the check for NULL. Signed-off-by: Lee Jones --- drivers/mfd/htc-i2cpld.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index b44f020..8e3ea07 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c @@ -227,13 +227,10 @@ static irqreturn_t htcpld_handler(int irq, void *dev) static void htcpld_chip_set(struct gpio_chip *chip, unsigned offset, int val) { struct i2c_client *client; - struct htcpld_chip *chip_data; + struct htcpld_chip *chip_data = + container_of(chip, struct htcpld_chip, chip_out); unsigned long flags; - chip_data = container_of(chip, struct htcpld_chip, chip_out); - if (!chip_data) - return; - client = chip_data->client; if (client == NULL) return;