From patchwork Thu Feb 20 08:53:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24985 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 89FF52066E for ; Thu, 20 Feb 2014 08:59:55 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fa1sf4086563pad.0 for ; Thu, 20 Feb 2014 00:59:54 -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=mGSxEepLboDNXO/ao0dDM+KAqTkMy/GIFwhnxYcseeE=; b=VwpXCU9SwDsUzilXeDdytn60yPKE4Zgx6eJyxpakF+f91Po7X85/W8yfBxY7XHFJaM Wwlb8E9Um7gWvSHNVCRq+rLIPFmY949//BjI+4gdtDpvQvk1kdbLHweGW8mdChMXYC1g rEWQnq4U27QPKkjw1pEv0vGpO/vATqEaDqKOQx9jgKQ+VwvCDPZ2Sy02UiKXjbNEAyh9 XUOid0VtqH8fIt2CWfsP4DKKKdcw2nxR/zqN4lf/OO1RXFGSLJI2z5sG1Wi/skG0EsN0 tZSDwmagXo5XSAa/OHOK9Jl8ww4MVftLy9fEObi1yr0AnwCI1taiWQDSPHc/4Qa4Ckvy EH9w== X-Gm-Message-State: ALoCoQk62UmjhNXiKE/xVLla9Fw2DamyEABtsjxM9erOrSzsyESkL1DtE/5/In+S9AkoJ8SMiM6k X-Received: by 10.68.197.73 with SMTP id is9mr298804pbc.0.1392886793529; Thu, 20 Feb 2014 00:59:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.76 with SMTP id k70ls416662qgk.30.gmail; Thu, 20 Feb 2014 00:59:53 -0800 (PST) X-Received: by 10.220.11.141 with SMTP id t13mr377242vct.30.1392886793378; Thu, 20 Feb 2014 00:59:53 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id xn5si1187099vdc.146.2014.02.20.00.59.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:53 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu8so1610163vcb.1 for ; Thu, 20 Feb 2014 00:59:53 -0800 (PST) X-Received: by 10.52.106.166 with SMTP id gv6mr278685vdb.86.1392886793290; Thu, 20 Feb 2014 00:59:53 -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 u4csp40773vcz; Thu, 20 Feb 2014 00:59:52 -0800 (PST) X-Received: by 10.67.22.100 with SMTP id hr4mr720398pad.112.1392886792497; Thu, 20 Feb 2014 00:59:52 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tt8si2682990pbc.190.2014.02.20.00.59.50; Thu, 20 Feb 2014 00:59:50 -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 S1755012AbaBTI7n (ORCPT + 26 others); Thu, 20 Feb 2014 03:59:43 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:63096 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754916AbaBTI7f (ORCPT ); Thu, 20 Feb 2014 03:59:35 -0500 Received: by mail-pd0-f182.google.com with SMTP id v10so1556870pde.27 for ; Thu, 20 Feb 2014 00:59:34 -0800 (PST) X-Received: by 10.68.189.5 with SMTP id ge5mr796160pbc.42.1392886774545; Thu, 20 Feb 2014 00:59:34 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id eo11sm21100112pac.0.2014.02.20.00.59.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:33 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org, Venu Byravarasu Subject: [PATCH 15/23] regulator: tps65090: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:15 +0530 Message-Id: <1392886403-10640-15-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392886403-10640-1-git-send-email-sachin.kamat@linaro.org> References: <1392886403-10640-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.220.170 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: , kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat Cc: Venu Byravarasu --- drivers/regulator/tps65090-regulator.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c index 5674f886c471..2e92ef68574d 100644 --- a/drivers/regulator/tps65090-regulator.c +++ b/drivers/regulator/tps65090-regulator.c @@ -168,17 +168,13 @@ static struct tps65090_platform_data *tps65090_parse_dt_reg_data( tps65090_pdata = devm_kzalloc(&pdev->dev, sizeof(*tps65090_pdata), GFP_KERNEL); - if (!tps65090_pdata) { - dev_err(&pdev->dev, "Memory alloc for tps65090_pdata failed\n"); + if (!tps65090_pdata) return ERR_PTR(-ENOMEM); - } reg_pdata = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX * sizeof(*reg_pdata), GFP_KERNEL); - if (!reg_pdata) { - dev_err(&pdev->dev, "Memory alloc for reg_pdata failed\n"); + if (!reg_pdata) return ERR_PTR(-ENOMEM); - } regulators = of_get_child_by_name(np, "regulators"); if (!regulators) { @@ -253,10 +249,8 @@ static int tps65090_regulator_probe(struct platform_device *pdev) pmic = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX * sizeof(*pmic), GFP_KERNEL); - if (!pmic) { - dev_err(&pdev->dev, "mem alloc for pmic failed\n"); + if (!pmic) return -ENOMEM; - } for (num = 0; num < TPS65090_REGULATOR_MAX; num++) { tps_pdata = tps65090_pdata->reg_pdata[num];