From patchwork Thu Feb 20 08:53:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24984 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4EE2B2066E for ; Thu, 20 Feb 2014 08:59:52 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id uz6sf5916559obc.6 for ; Thu, 20 Feb 2014 00:59:51 -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=f4ufG31/KF8PvSotlCSFZiT2unlvnqnrmLTODLU/WJo=; b=MANm3ApFsLXSzJzawmPQLsQT86ZassWn9Qap5reJJ5I31XeAJxNrNqrsouF5qhCrIm dx5dIynkIvL6zwuxNtz1rhwZj2OSJXsRqCs0GCheO5td6AicON4bZS3mNrZJQQg08sPl 6r35VLYcUQJZAthG22sZanWDWEubONyMWfAFK0JyNDyyyHRXEzwGwv6tk/VMIwOeo8AV GPkGpzd+ljCARZYoGgXk0TTuoz/VuxIJ6TMRyEvztfYqbHOYjEmBlZHmv/IemQgvH1SM v0xxTysvUdb73zl6GBtCUMm84l9N1+oHT6Fg7JLm+9pSwgmrfEp9FpdqYWUPAehKZQdd CL8g== X-Gm-Message-State: ALoCoQm+SZnXsK10YL+VnhbCoKuGSPLMih3P6/GXNagq6fWTpnpmsuieJ8s3uIkIlKr+qED0RxyA X-Received: by 10.182.153.68 with SMTP id ve4mr234134obb.39.1392886791852; Thu, 20 Feb 2014 00:59:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.47 with SMTP id s44ls467866qgs.70.gmail; Thu, 20 Feb 2014 00:59:51 -0800 (PST) X-Received: by 10.53.0.230 with SMTP id bb6mr269473vdd.39.1392886791534; Thu, 20 Feb 2014 00:59:51 -0800 (PST) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id y6si1203427veb.63.2014.02.20.00.59.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.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.220.180; Received: by mail-vc0-f180.google.com with SMTP id ks9so1575181vcb.11 for ; Thu, 20 Feb 2014 00:59:51 -0800 (PST) X-Received: by 10.52.61.168 with SMTP id q8mr308905vdr.40.1392886791463; Thu, 20 Feb 2014 00:59:51 -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 u4csp40769vcz; Thu, 20 Feb 2014 00:59:51 -0800 (PST) X-Received: by 10.66.248.227 with SMTP id yp3mr731443pac.116.1392886790682; Thu, 20 Feb 2014 00:59:50 -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.48; Thu, 20 Feb 2014 00:59: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 S1754920AbaBTI7d (ORCPT + 26 others); Thu, 20 Feb 2014 03:59:33 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:59054 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754884AbaBTI7a (ORCPT ); Thu, 20 Feb 2014 03:59:30 -0500 Received: by mail-pa0-f54.google.com with SMTP id fa1so1633111pad.27 for ; Thu, 20 Feb 2014 00:59:28 -0800 (PST) X-Received: by 10.68.191.200 with SMTP id ha8mr769781pbc.66.1392886768931; Thu, 20 Feb 2014 00:59:28 -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.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:28 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org, Laxman Dewangan Subject: [PATCH 13/23] regulator: tps62360: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:13 +0530 Message-Id: <1392886403-10640-13-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.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 Cc: Laxman Dewangan --- drivers/regulator/tps62360-regulator.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c index c3fa15a299b1..a1672044e519 100644 --- a/drivers/regulator/tps62360-regulator.c +++ b/drivers/regulator/tps62360-regulator.c @@ -299,10 +299,8 @@ static struct tps62360_regulator_platform_data * struct device_node *np = dev->of_node; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) { - dev_err(dev, "Memory alloc failed for platform data\n"); + if (!pdata) return NULL; - } pdata->reg_init_data = of_get_regulator_init_data(dev, dev->of_node); if (!pdata->reg_init_data) { @@ -377,11 +375,8 @@ static int tps62360_probe(struct i2c_client *client, } tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); - if (!tps) { - dev_err(&client->dev, "%s(): Memory allocation failed\n", - __func__); + if (!tps) return -ENOMEM; - } tps->en_discharge = pdata->en_discharge; tps->en_internal_pulldn = pdata->en_internal_pulldn;