From patchwork Thu Feb 20 08:53:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24994 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 974D42066E for ; Thu, 20 Feb 2014 09:05:20 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id to1sf6207210ieb.7 for ; Thu, 20 Feb 2014 01:05:19 -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=6YnZvuMcwMlnELFqTXxpOomJIy1YMTaAPSPhTMObEwA=; b=ht+WZ/qxf7kl1h63qQyaINkZbkZmbAdb8bD62POKOG96bRnU3FQweG79C1erBOglgN Kd0t7mnXuH3iFN4YyS9WUBmfOC3WieMKspbbxYTTdKsw+5CkHYCmXGYu9m+F61Y18N5J hkLy/3+XZZTsw2XXzwF+mf3pqvZzu2lw7qj1AoV0MdmQhAEu9Nsnykzl5/7TiBgqg8u7 3G9Z/o1k9P6wa+eWv6dBtpKKva2mI6EmyW4rnaZBCalR6Gr1s/txYsXJ5ar5X12Y5w+n /BUzmD0xnjIdDhMDsmsuvKlaPy3aiDzElfGQWzOo/TBHBKhNK9pCmJnbOSV7FoAigstt U/Dg== X-Gm-Message-State: ALoCoQmvFv1oOAC1tX1Fj7d1y1sXwQC51wzqbYkpf8ZYFgKah22ea/YyNCw0B9FJRnEkUQPll/1i X-Received: by 10.182.153.68 with SMTP id ve4mr245540obb.39.1392887119731; Thu, 20 Feb 2014 01:05:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.46.98 with SMTP id j89ls484486qga.73.gmail; Thu, 20 Feb 2014 01:05:19 -0800 (PST) X-Received: by 10.52.104.68 with SMTP id gc4mr333843vdb.2.1392887119625; Thu, 20 Feb 2014 01:05:19 -0800 (PST) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id el6si1204830vcb.89.2014.02.20.01.05.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 01:05:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.169 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.169; Received: by mail-ve0-f169.google.com with SMTP id oy12so1596078veb.0 for ; Thu, 20 Feb 2014 01:05:19 -0800 (PST) X-Received: by 10.220.191.134 with SMTP id dm6mr400957vcb.16.1392887119566; Thu, 20 Feb 2014 01:05:19 -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 u4csp41151vcz; Thu, 20 Feb 2014 01:05:19 -0800 (PST) X-Received: by 10.68.218.3 with SMTP id pc3mr668517pbc.71.1392887118730; Thu, 20 Feb 2014 01:05:18 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yn4si2575746pab.23.2014.02.20.01.05.17; Thu, 20 Feb 2014 01:05:18 -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 S1755333AbaBTJDv (ORCPT + 26 others); Thu, 20 Feb 2014 04:03:51 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:50937 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754885AbaBTI7b (ORCPT ); Thu, 20 Feb 2014 03:59:31 -0500 Received: by mail-pb0-f46.google.com with SMTP id um1so1638103pbc.33 for ; Thu, 20 Feb 2014 00:59:31 -0800 (PST) X-Received: by 10.68.132.233 with SMTP id ox9mr731981pbb.138.1392886771557; Thu, 20 Feb 2014 00:59:31 -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.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:30 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 14/23] regulator: tps6507x: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:14 +0530 Message-Id: <1392886403-10640-14-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.128.169 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 --- drivers/regulator/tps6507x-regulator.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c index e506e7f54253..98e66ce26723 100644 --- a/drivers/regulator/tps6507x-regulator.c +++ b/drivers/regulator/tps6507x-regulator.c @@ -380,10 +380,8 @@ static struct tps6507x_board *tps6507x_parse_dt_reg_data( tps_board = devm_kzalloc(&pdev->dev, sizeof(*tps_board), GFP_KERNEL); - if (!tps_board) { - dev_err(&pdev->dev, "Failure to alloc pdata for regulators.\n"); + if (!tps_board) return NULL; - } regulators = of_get_child_by_name(np, "regulators"); if (!regulators) { @@ -406,10 +404,8 @@ static struct tps6507x_board *tps6507x_parse_dt_reg_data( reg_data = devm_kzalloc(&pdev->dev, (sizeof(struct regulator_init_data) * TPS6507X_NUM_REGULATOR), GFP_KERNEL); - if (!reg_data) { - dev_err(&pdev->dev, "Failure to alloc init data for regulators.\n"); + if (!reg_data) return NULL; - } tps_board->tps6507x_pmic_init_data = reg_data;