From patchwork Thu Feb 20 08:53:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24986 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0465C2066E for ; Thu, 20 Feb 2014 09:00:50 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id t60sf2458705wes.11 for ; Thu, 20 Feb 2014 01:00:49 -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=5s26AEcqNf5O09gLJ+kn9aA3S/4mgQXHamWxK65j4xk=; b=S3jjuymnps42out8D7z9hmp1QBomnsBssWdNT2rfSi/u3psnsBQCYkjwn6oGWLyHTG PlLZgU4dQRHS4lP8favNu3h/7JiqNxsmuOtEHwLBGdSohImkTBM9D5ZAFURYmU68LtIO VrJ2oBbTBQfPFeOb4/snI/qLegDf42S6mGS1LnI2pVIWIrp5OR8XnpKG6mdQG0r42E83 OIyj12+Q1TkhhCe04rw7NHE1tV81UXN8basa8ommW1GWdbadLliI36E+k8sqxyD/V6GL RM9Jq7heBuU1E30O5to5+JTBDfts7i9e5/pW9lQp4LeoDfHVcBe3l3mqUFHjuQaofQtw m5cw== X-Gm-Message-State: ALoCoQlEprQ6r1yZDSQj4TC8VTidw7ECzBUyEnCW6TZclAgzTteUDjRHQGhGtKLN1v/4pkEdg6K6 X-Received: by 10.112.168.68 with SMTP id zu4mr315223lbb.14.1392886849454; Thu, 20 Feb 2014 01:00:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.134 with SMTP id b6ls452100qgb.91.gmail; Thu, 20 Feb 2014 01:00:48 -0800 (PST) X-Received: by 10.220.106.7 with SMTP id v7mr368564vco.46.1392886848791; Thu, 20 Feb 2014 01:00:48 -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 f5si1208353vej.35.2014.02.20.01.00.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 01:00:48 -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 jw12so1555791veb.32 for ; Thu, 20 Feb 2014 01:00:48 -0800 (PST) X-Received: by 10.220.192.71 with SMTP id dp7mr313772vcb.45.1392886848729; Thu, 20 Feb 2014 01:00:48 -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 u4csp40851vcz; Thu, 20 Feb 2014 01:00:48 -0800 (PST) X-Received: by 10.66.146.133 with SMTP id tc5mr787256pab.58.1392886847786; Thu, 20 Feb 2014 01:00:47 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si2586063pbl.298.2014.02.20.01.00.47; Thu, 20 Feb 2014 01:00:47 -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 S1755116AbaBTI7x (ORCPT + 26 others); Thu, 20 Feb 2014 03:59:53 -0500 Received: from mail-pb0-f49.google.com ([209.85.160.49]:52338 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754350AbaBTI7u (ORCPT ); Thu, 20 Feb 2014 03:59:50 -0500 Received: by mail-pb0-f49.google.com with SMTP id up15so1622491pbc.36 for ; Thu, 20 Feb 2014 00:59:50 -0800 (PST) X-Received: by 10.69.1.38 with SMTP id bd6mr698684pbd.17.1392886789981; Thu, 20 Feb 2014 00:59:49 -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.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:47 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 20/23] regulator: wm831x-dcdc: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:20 +0530 Message-Id: <1392886403-10640-20-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 --- drivers/regulator/wm831x-dcdc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 04cf9c16ef23..0d88a82ab2a2 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -469,10 +469,8 @@ static int wm831x_buckv_probe(struct platform_device *pdev) dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL); - if (dcdc == NULL) { - dev_err(&pdev->dev, "Unable to allocate private data\n"); + if (!dcdc) return -ENOMEM; - } dcdc->wm831x = wm831x; @@ -622,10 +620,8 @@ static int wm831x_buckp_probe(struct platform_device *pdev) dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL); - if (dcdc == NULL) { - dev_err(&pdev->dev, "Unable to allocate private data\n"); + if (!dcdc) return -ENOMEM; - } dcdc->wm831x = wm831x; @@ -752,10 +748,8 @@ static int wm831x_boostp_probe(struct platform_device *pdev) return -ENODEV; dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL); - if (dcdc == NULL) { - dev_err(&pdev->dev, "Unable to allocate private data\n"); + if (!dcdc) return -ENOMEM; - } dcdc->wm831x = wm831x; @@ -842,10 +836,8 @@ static int wm831x_epe_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1); dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL); - if (dcdc == NULL) { - dev_err(&pdev->dev, "Unable to allocate private data\n"); + if (!dcdc) return -ENOMEM; - } dcdc->wm831x = wm831x;