From patchwork Tue Nov 20 11:04:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12983 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 49D8823FC6 for ; Tue, 20 Nov 2012 11:10:51 +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 EACF1A19160 for ; Tue, 20 Nov 2012 11:10:50 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7961185iej.11 for ; Tue, 20 Nov 2012 03:10:50 -0800 (PST) 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=RY9IBEYKzAm4ZZ7J41j/1VSoMi/ZnLV6LOKehCcVjTI=; b=im1K6dgzeIMVG1bH9g/2q5JlbkANggen99VF1Qp/jeI6WbhYXlXHEZWQbwRVaqe/kC 9lIQj0loQRgp9WSeO154wGcxB/3gjMzHCE80KUGueYuhGRuiCojqcZ5k0Xws6vyfaZM9 WgR1AZePEHbkFP6ti0QhoD7U9QZDp+47WsxvKLIlMyoFSYR/a1eRIF9G0pCAVzWQE+XH pmLR8DO5qgcuq9p6BjjNYT+2B6UVP7RdqothwDQVRIBdrFaOrQwJykxoT0NVum/P5/8V E4BPB8XFifZ4G3RIR/PpFszrbohKia9PDaHbJe0iGs/ypmZpzsM/Wa3L17O03xfPpff/ XyZA== Received: by 10.50.187.197 with SMTP id fu5mr9465882igc.70.1353409850416; Tue, 20 Nov 2012 03:10:50 -0800 (PST) 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.67.148 with SMTP id n20csp301398igt; Tue, 20 Nov 2012 03:10:50 -0800 (PST) Received: by 10.68.253.226 with SMTP id ad2mr41770469pbd.38.1353409849885; Tue, 20 Nov 2012 03:10:49 -0800 (PST) Received: from mail-da0-f43.google.com (mail-da0-f43.google.com [209.85.210.43]) by mx.google.com with ESMTPS id qu6si17872837pbc.225.2012.11.20.03.10.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:10:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-da0-f43.google.com with SMTP id u36so2501047dak.2 for ; Tue, 20 Nov 2012 03:10:49 -0800 (PST) Received: by 10.68.230.200 with SMTP id ta8mr41373023pbc.13.1353409849440; Tue, 20 Nov 2012 03:10:49 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz10sm7917060pbc.37.2012.11.20.03.10.45 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:10:47 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] pinctrl: pinctrl-single: Fix error check condition Date: Tue, 20 Nov 2012 16:34:39 +0530 Message-Id: <1353409479-3304-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQnxbl8GF/YHAVgnQL8EkBj4tan6w4fDqB+nDbdNd9aI4PeXuVRlUZkpWnmuUCHEBRliEq8v *map should be tested for NULL instead of map. Signed-off-by: Sachin Kamat --- drivers/pinctrl/pinctrl-single.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 726a729..3fc2a22 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -772,7 +772,7 @@ static int pcs_dt_node_to_map(struct pinctrl_dev *pctldev, pcs = pinctrl_dev_get_drvdata(pctldev); *map = devm_kzalloc(pcs->dev, sizeof(**map), GFP_KERNEL); - if (!map) + if (!*map) return -ENOMEM; *num_maps = 0;