From patchwork Wed Aug 8 14:47:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10588 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 69E8123E53 for ; Wed, 8 Aug 2012 14:47:40 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 38354A1905B for ; Wed, 8 Aug 2012 14:47:40 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so837495ggn.11 for ; Wed, 08 Aug 2012 07:47:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=QMKbQ1d2hP+TMQx/7uY7y86MOZiFqWBWbWfOApZ6aiY=; b=QeZ0oKwQ4J4jl59MVZvGjuCzATMj7sqw6SgmOqFWublF5RJXwmrGXbIWO/SYXHChuQ 0bApYpNBGF1b046MwQUtre4IZgkmJbX64g7ZrFaSOq1oZgkBTSset7pZR1LAV9dGr6/2 LhnI0iaov1pPObYwgPszjtG1h/dejD5cLZqIhSOIAeopHbY2Be+c1Jl9gRWIx7gBnsVz 8VscDIV4drIut+G3XOAFteZdZ04CLtfrySgHkC8gil4+rCa0VUtN/Jl7aWlYCFTVwgFj h4Wnz6vdjfCChL8W767ItGkKXQEmHvKG9RJ4yfKd9GzQ2aeeIdCn9dOb1Yj5zxWkxmh2 BobA== Received: by 10.50.94.133 with SMTP id dc5mr394320igb.16.1344437259702; Wed, 08 Aug 2012 07:47:39 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp611861igc; Wed, 8 Aug 2012 07:47:38 -0700 (PDT) Received: by 10.216.232.204 with SMTP id n54mr10256681weq.182.1344437256722; Wed, 08 Aug 2012 07:47:36 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.171]) by mx.google.com with ESMTP id r4si6948552wif.16.2012.08.08.07.47.36; Wed, 08 Aug 2012 07:47:36 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MCObR-1SqYyK1Df7-009ppd; Wed, 08 Aug 2012 16:47:33 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Paul Parsons , Philipp Zabel , Samuel Ortiz Subject: [PATCH 02/11] mfd/asic3: fix asic3_mfd_probe return value Date: Wed, 8 Aug 2012 16:47:19 +0200 Message-Id: <1344437248-20560-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1344437248-20560-1-git-send-email-arnd@arndb.de> References: <1344437248-20560-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:BQTU6HmlEB1Dwy+y5HiETfO3iNX7jVzrTGmq0MiEmQ7 1TTjncTNUAeZvBXoQRDh7F8HORGX6MIoQQNeTTi06V+5yVVfK4 yfAn0tWceZQfOA/tG9MrS7gE4WAXqHCotIx6gJJP0K3H0VeBfb pj+fSqaJRQhNZDonse4TTzIQIsmQhw4xb0jv/sTv7H0i0dwGvB XZUfz/cM15EtRYetDa9mPqKqL/uhBlhT/IIWiBscLNOBi/7ozd 2jI3u2P/qP4nGxbAVhOmHnhimnq21Dc5Z64p6lXQJbrgcloPNk wwRzyqh6uTWXHC+bAzzddqhtWEbKgNvymWI7ZpM9Z+jHZP0AJh +KomE6mJ3wiLKxJeColMpFR6OOT6psetGSKAgpPrue1k0HG9jx MJmZDBmzjztgC6JOFJITBc/z3/Bn1f5QhY= X-Gm-Message-State: ALoCoQlNRKjz/Rs/HIIQC6p+6BP5kMJZiRlqJxQeByir1421RlnGmJSk2lI3NF+vmomm6qYcHS7J In commit 4f304245b "mfd: Set asic3 DS1WM clock_rate", a possible path through asic3_mfd_probe was introduced that would lead to an unpredictable return value, if everything succeeds but there are pdata->leds is NULL. This was reported correctly by gcc. Without this patch, building magician_defconfig results in: drivers/mfd/asic3.c: In function 'asic3_mfd_probe': drivers/mfd/asic3.c:940:2: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Arnd Bergmann Cc: Paul Parsons Cc: Philipp Zabel Cc: Samuel Ortiz --- drivers/mfd/asic3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 383421b..683e18a 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c @@ -925,6 +925,7 @@ static int __init asic3_mfd_probe(struct platform_device *pdev, goto out; } + ret = 0; if (pdata->leds) { int i;