From patchwork Thu Feb 20 08:53:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24987 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E9EC20AE6 for ; Thu, 20 Feb 2014 09:00:51 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b15sf2341832eek.8 for ; Thu, 20 Feb 2014 01:00:50 -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=u0QsZkMbaoNeJrss/o3bxH3/rUzK4MX9Er7M1VoeG4U=; b=iylc+ZT6U+sR0JnIg3DBqbEBoTESLbugfa0paxQOVFjMqPpJ8Ugt37j68svkpI0tal spJ6UJicP0pRWAd91Q51E0g7hJb1tK10TSNwlw4zkDM2Wn4w2uQwib3SYYcvj8Em//pm 87zlko3pdiLahZvWxaQRgwsyThpBK6J3EAYyLvzuTdy8J6qIA0WQ+fU+S/GO8Q0CzGvw gBj6oL4oc4bKalkpEp3Kr+jj64lYHLG0ZJ+KKxo1+7ho2Xapk55zdhYkQ72Ij6Wk5Dy0 UvNtnYWNXcNh+B6koFHkxN2b28HtcfFLPJSBWR9kTOja3A7DZ39JsTeS7oxX5fVIAnUk QzqQ== X-Gm-Message-State: ALoCoQmtgg0jh5nwIqeCsGIfr/Vrayjec81VXQHfit9f0DqWnoZ6Asp41wc0sykqRn2oRm1mZ0Se X-Received: by 10.112.144.165 with SMTP id sn5mr298584lbb.11.1392886850404; Thu, 20 Feb 2014 01:00:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.72 with SMTP id e66ls423416qge.67.gmail; Thu, 20 Feb 2014 01:00:49 -0800 (PST) X-Received: by 10.220.178.73 with SMTP id bl9mr376277vcb.42.1392886849747; Thu, 20 Feb 2014 01:00:49 -0800 (PST) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id kl10si1192612vdb.116.2014.02.20.01.00.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 01:00:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id cz12so328789veb.11 for ; Thu, 20 Feb 2014 01:00:49 -0800 (PST) X-Received: by 10.220.81.71 with SMTP id w7mr292372vck.71.1392886849680; Thu, 20 Feb 2014 01:00:49 -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 u4csp40852vcz; Thu, 20 Feb 2014 01:00:49 -0800 (PST) X-Received: by 10.68.228.138 with SMTP id si10mr708198pbc.13.1392886848820; Thu, 20 Feb 2014 01:00:48 -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.48; Thu, 20 Feb 2014 01:00:48 -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 S1755158AbaBTI76 (ORCPT + 26 others); Thu, 20 Feb 2014 03:59:58 -0500 Received: from mail-pd0-f176.google.com ([209.85.192.176]:57637 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755120AbaBTI74 (ORCPT ); Thu, 20 Feb 2014 03:59:56 -0500 Received: by mail-pd0-f176.google.com with SMTP id w10so1544218pde.21 for ; Thu, 20 Feb 2014 00:59:55 -0800 (PST) X-Received: by 10.68.184.66 with SMTP id es2mr694862pbc.19.1392886795534; Thu, 20 Feb 2014 00:59:55 -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.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:54 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 22/23] regulator: wm831x-ldo: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:22 +0530 Message-Id: <1392886403-10640-22-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.180 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-ldo.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index 46d6700467b5..eca0eeb78acd 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c @@ -235,10 +235,8 @@ static int wm831x_gp_ldo_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); - if (ldo == NULL) { - dev_err(&pdev->dev, "Unable to allocate private data\n"); + if (!ldo) return -ENOMEM; - } ldo->wm831x = wm831x; @@ -447,10 +445,8 @@ static int wm831x_aldo_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); - if (ldo == NULL) { - dev_err(&pdev->dev, "Unable to allocate private data\n"); + if (!ldo) return -ENOMEM; - } ldo->wm831x = wm831x; @@ -594,10 +590,8 @@ static int wm831x_alive_ldo_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); - if (ldo == NULL) { - dev_err(&pdev->dev, "Unable to allocate private data\n"); + if (!ldo) return -ENOMEM; - } ldo->wm831x = wm831x;