From patchwork Thu Feb 20 08:53:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24993 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BAAC92066E for ; Thu, 20 Feb 2014 09:03:13 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf3852707pbc.8 for ; Thu, 20 Feb 2014 01:03:06 -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=yLZW0L5lAZUy48HyVGng3+8ZjTCR6gA7TL3kothgy00=; b=Rf9P4OV6rsap/caWddqwD/GC8OLKjQ8KLLoCl0O6GQQ0HK+aFXyMBsZQPDVvEjbgAY mUJBN0bKOjtRL4NX9hjRL6yc8D8zAJ/03XScw81RtAXH1WAHpjNDjuweMEvmWfKUGz0U W/ONeWOfFI7tiKv45i90oDoGxfn+a37CG9yrQUseQ6gvui3ArXY0DaEBtHk18iJsGM47 geDdGGRFXiAwc8xsCGAd5unAQCseXl5sz0KvOvhWJZn0swO8szq2rpXiDoqKJ4j8nxcD yZmP0+4c00vn99ZbsFI2A397TO+qu64d6kXXbvK4P8m4aYMN8b6LH8SIulP92ZUIqU4c v0dA== X-Gm-Message-State: ALoCoQkDEKwsfr7VWhNeoHDI5HUXczA2cXkCEy7MNWypoGKXshL4eqftAktIqVIdChsCCilSOOl2 X-Received: by 10.66.65.109 with SMTP id w13mr249054pas.21.1392886986007; Thu, 20 Feb 2014 01:03:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.244 with SMTP id w107ls433675qge.26.gmail; Thu, 20 Feb 2014 01:03:05 -0800 (PST) X-Received: by 10.52.104.68 with SMTP id gc4mr329241vdb.2.1392886985894; Thu, 20 Feb 2014 01:03:05 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id ug9si1211529vcb.32.2014.02.20.01.03.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 01:03:05 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 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.173; Received: by mail-ve0-f173.google.com with SMTP id jw12so1558102veb.32 for ; Thu, 20 Feb 2014 01:03:05 -0800 (PST) X-Received: by 10.52.107.35 with SMTP id gz3mr326059vdb.8.1392886985830; Thu, 20 Feb 2014 01:03:05 -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 u4csp41006vcz; Thu, 20 Feb 2014 01:03:05 -0800 (PST) X-Received: by 10.68.198.97 with SMTP id jb1mr763743pbc.104.1392886984892; Thu, 20 Feb 2014 01:03:04 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id io5si3259009pbc.324.2014.02.20.01.03.04; Thu, 20 Feb 2014 01:03:04 -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 S1755318AbaBTJCx (ORCPT + 26 others); Thu, 20 Feb 2014 04:02:53 -0500 Received: from mail-pd0-f171.google.com ([209.85.192.171]:63183 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754944AbaBTI7k (ORCPT ); Thu, 20 Feb 2014 03:59:40 -0500 Received: by mail-pd0-f171.google.com with SMTP id g10so1554127pdj.30 for ; Thu, 20 Feb 2014 00:59:40 -0800 (PST) X-Received: by 10.66.65.204 with SMTP id z12mr772907pas.60.1392886780030; Thu, 20 Feb 2014 00:59:40 -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.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:39 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org, Mike Rapoport Subject: [PATCH 17/23] regulator: tps6586x: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:17 +0530 Message-Id: <1392886403-10640-17-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.173 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: Mike Rapoport --- drivers/regulator/tps6586x-regulator.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 0485d47f0d8a..e36f3569767f 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -363,10 +363,8 @@ static struct tps6586x_platform_data *tps6586x_parse_regulator_dt( } pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) { - dev_err(&pdev->dev, "Memory alloction failed\n"); + if (!pdata) return NULL; - } for (i = 0; i < num; i++) { int id; @@ -420,10 +418,8 @@ static int tps6586x_regulator_probe(struct platform_device *pdev) rdev = devm_kzalloc(&pdev->dev, TPS6586X_ID_MAX_REGULATOR * sizeof(*rdev), GFP_KERNEL); - if (!rdev) { - dev_err(&pdev->dev, "Mmemory alloc failed\n"); + if (!rdev) return -ENOMEM; - } version = tps6586x_get_version(pdev->dev.parent);