From patchwork Tue Feb 18 10:41:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24833 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 642C8203C5 for ; Tue, 18 Feb 2014 10:50:29 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf63285703obc.11 for ; Tue, 18 Feb 2014 02:50:28 -0800 (PST) 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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=P6VvrY/DFf8pCvEJLYD7ykar/oAW9mPp2Ueij5gkMKw=; b=J8OMaw27wwdlFabmBhrhLLOPaSE6T/tVlGbL+hTzqD0rC2nLXBB/TUcdcZTdJKwHzI fIt9LFOn62Zu2+HQMmpJAEU6zzvUpOCRFYltpUFDWj/+hvCrRt86sXBysLn7JRLsUVW8 H6fx1Ymu9QOWTsITyPmNnGdlAsH1FzMR+JBtMywumuaEeHUL75dsEi2TSM8o+0C1abOp DdSlKAV2W2atEz4cp3SWpSKL9EYqdLcx9ryB5hQ+wayfz4FB08MioFSTgxTAIhfwH+Gv +gLrou/oyqX1xkqlRk73jg2oYwVuJeBabEaI48KhARx5bao8vjVd9RAPorQ9K+lueCTC 5OzA== X-Gm-Message-State: ALoCoQloNoJ+VYtpxxDFVU2AMNPg5rcQ4NrN5Fr2ZjWQGQUhSi+iTSyHxM7FFfQvP578bjnWZN0D X-Received: by 10.182.112.231 with SMTP id it7mr12342756obb.22.1392720628331; Tue, 18 Feb 2014 02:50:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.244 with SMTP id w107ls1291040qge.26.gmail; Tue, 18 Feb 2014 02:50:28 -0800 (PST) X-Received: by 10.220.106.7 with SMTP id v7mr1590330vco.46.1392720628180; Tue, 18 Feb 2014 02:50:28 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id kn3si5373894veb.130.2014.02.18.02.50.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:50:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id c14so13412731vea.31 for ; Tue, 18 Feb 2014 02:50:28 -0800 (PST) X-Received: by 10.220.53.66 with SMTP id l2mr5145649vcg.33.1392720628108; Tue, 18 Feb 2014 02:50:28 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp207361vcz; Tue, 18 Feb 2014 02:50:27 -0800 (PST) X-Received: by 10.66.189.226 with SMTP id gl2mr32604794pac.65.1392720627304; Tue, 18 Feb 2014 02:50:27 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zk9si17926081pac.28.2014.02.18.02.50.26; Tue, 18 Feb 2014 02:50:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755029AbaBRKq7 (ORCPT + 27 others); Tue, 18 Feb 2014 05:46:59 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:43155 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755003AbaBRKq4 (ORCPT ); Tue, 18 Feb 2014 05:46:56 -0500 Received: by mail-pd0-f170.google.com with SMTP id p10so16111450pdj.29 for ; Tue, 18 Feb 2014 02:46:55 -0800 (PST) X-Received: by 10.66.8.131 with SMTP id r3mr31587770paa.7.1392720415817; Tue, 18 Feb 2014 02:46:55 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id gj9sm5442084pbc.7.2014.02.18.02.46.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:46:55 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 05/15] regulator: max8925: Do not hardcode return value Date: Tue, 18 Feb 2014 16:11:01 +0530 Message-Id: <1392720071-13503-5-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392720071-13503-1-git-send-email-sachin.kamat@linaro.org> References: <1392720071-13503-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Propagate the error value returned by the function instead. Signed-off-by: Sachin Kamat --- drivers/regulator/max8925-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index 5b939894bfc4..9c859ed4131b 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c @@ -264,7 +264,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev, &max8925_regulator_matches[ridx], 1); of_node_put(np); if (rcount < 0) - return -ENODEV; + return rcount; config->init_data = max8925_regulator_matches[ridx].init_data; config->of_node = max8925_regulator_matches[ridx].of_node;