From patchwork Fri Sep 14 12:02:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11419 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 B1B3323E2F for ; Fri, 14 Sep 2012 12:05:17 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 28DCCA34108 for ; Fri, 14 Sep 2012 12:05:17 +0000 (UTC) Received: by ieak11 with SMTP id k11so6427940iea.11 for ; Fri, 14 Sep 2012 05:05:16 -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:x-gm-message-state; bh=Ue0cjRBearrgSXnNrgrFzNIiADAr00NgCaO8j+mkzXw=; b=m8ow+AA2C6KO/U+ric8guvoSF0MfNkSsFk0u0ll9PGkzr9q9ZfZ9snTjnXyySy0yRp BCu/U0fwB2auC9tZ5ExBaY7+2TZSLHeA1nidFIasQx6vY1YqET+B9PavUehJ2QbjVHx0 6mFWGvfy/Y+4rN6auJMANGHoL7zNuiqnMdIRmznuWaKu4wDjssYYvvjGfFtCKwfU/5FW T2aoJsTz4B9WHXfmx3/bcJaMnJflcachD7EMJjlaQbJdlbVxE9raBXhuVesM16lp6IvG Vh6k+ZJ0ZqX7JWiUZjL+mA1YVgnoOa761c3g9yUxBSXE1iWy4/1BJ+5PqVSpi7upC/s0 jPdQ== Received: by 10.50.207.106 with SMTP id lv10mr3004806igc.0.1347624316470; Fri, 14 Sep 2012 05:05:16 -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.232 with SMTP id ex8csp186273igc; Fri, 14 Sep 2012 05:05:15 -0700 (PDT) Received: by 10.68.237.38 with SMTP id uz6mr5067751pbc.23.1347624315024; Fri, 14 Sep 2012 05:05:15 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id pp1si2410562pbc.182.2012.09.14.05.05.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 05:05:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by pbcmd12 with SMTP id md12so6352330pbc.37 for ; Fri, 14 Sep 2012 05:05:14 -0700 (PDT) Received: by 10.68.203.200 with SMTP id ks8mr4859884pbc.142.1347624314416; Fri, 14 Sep 2012 05:05:14 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pv9sm872724pbb.67.2012.09.14.05.05.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 05:05:13 -0700 (PDT) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, sachin.kamat@linaro.org, patches@linaro.org, Thomas Abraham Subject: [PATCH 1/1] pinctrl: Samsung: Fix return value Date: Fri, 14 Sep 2012 17:32:04 +0530 Message-Id: <1347624124-27535-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkIFifEEmkW7eCXQOYb6ha6KYxEtgeATWaIy4iOYh1pumt90iaBObmamb+ej7JO9WVH/GOD Return the value obtained from of_property_count_strings() instead of -EINVAL. Silences the following smatch warning: drivers/pinctrl/pinctrl-samsung.c:529 samsung_pinctrl_parse_dt_pins() info: why not propagate '*npins' from of_property_count_strings() instead of -22? Cc: Thomas Abraham Signed-off-by: Sachin Kamat --- drivers/pinctrl/pinctrl-samsung.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index 8a24223..824fda9 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c @@ -526,7 +526,7 @@ static int __init samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, *npins = of_property_count_strings(cfg_np, "samsung,pins"); if (*npins < 0) { dev_err(dev, "invalid pin list in %s node", cfg_np->name); - return -EINVAL; + return *npins; } *pin_list = devm_kzalloc(dev, *npins * sizeof(**pin_list), GFP_KERNEL);