From patchwork Thu Feb 20 08:53:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24983 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A497D2066E for ; Thu, 20 Feb 2014 08:59:49 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j5sf2924360qaq.10 for ; Thu, 20 Feb 2014 00:59: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=a8h3iFlVDTpfTkT+0tENXuutWH5Sw+Zv/0Xsqc2F0S0=; b=jmk9wkGpu7fYZsv7t2jbKLFFdv5DE7ly6N4PJnrtpjT0dlLHTWxaYXRvSzN8IMdZl+ Xu/nN08Oq3WvbEsPHh2FCIhCfsBy5xBVEtz9Sq3ZBGosUuJF6lT2hSafCT05rWZMRT4i Rt69ZGx+2ZFmqntqx6CkB8QaQIu96issMhSFVU5AoGlfgO4FycCha5g3SPPgK381CnM9 8Tq7Rlu9lJyqn7x2Qe3yiMPFSCazf8UdP8F+ga8Uy4iWaLKumeMN4DwJbNbub2gYeHQo lapX1fRB9oBSYh+24H2vSt04h2Md394hJkVU4seHTwfXOW/tKKUR8smL+wKjt2GkQbOP Bppg== X-Gm-Message-State: ALoCoQkjoRxySM7Qr33GJkF/qJMNKHQH0bQQz/9gT6a8UK9mA3rVbZrVee56I0FauwbQRPnJaNnt X-Received: by 10.236.210.40 with SMTP id t28mr218881yho.44.1392886789252; Thu, 20 Feb 2014 00:59:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.101 with SMTP id y92ls463151qgy.92.gmail; Thu, 20 Feb 2014 00:59:49 -0800 (PST) X-Received: by 10.236.113.244 with SMTP id a80mr974880yhh.115.1392886789136; Thu, 20 Feb 2014 00:59:49 -0800 (PST) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id v21si3056484yhl.30.2014.02.20.00.59.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.182 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.182; Received: by mail-vc0-f182.google.com with SMTP id id10so1600406vcb.27 for ; Thu, 20 Feb 2014 00:59:48 -0800 (PST) X-Received: by 10.52.164.39 with SMTP id yn7mr270569vdb.25.1392886788949; Thu, 20 Feb 2014 00:59: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 u4csp40766vcz; Thu, 20 Feb 2014 00:59:48 -0800 (PST) X-Received: by 10.68.178.229 with SMTP id db5mr624376pbc.97.1392886788141; Thu, 20 Feb 2014 00:59:48 -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.46; Thu, 20 Feb 2014 00:59:46 -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 S1754880AbaBTI7a (ORCPT + 26 others); Thu, 20 Feb 2014 03:59:30 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:46829 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754810AbaBTI70 (ORCPT ); Thu, 20 Feb 2014 03:59:26 -0500 Received: by mail-pa0-f42.google.com with SMTP id kl14so1651337pab.1 for ; Thu, 20 Feb 2014 00:59:25 -0800 (PST) X-Received: by 10.68.190.163 with SMTP id gr3mr619128pbc.103.1392886765891; Thu, 20 Feb 2014 00:59:25 -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.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:25 -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 12/23] regulator: tps51632: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:12 +0530 Message-Id: <1392886403-10640-12-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.182 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/tps51632-regulator.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c index b3764f594ee9..f31f22e3e1bd 100644 --- a/drivers/regulator/tps51632-regulator.c +++ b/drivers/regulator/tps51632-regulator.c @@ -227,10 +227,8 @@ static struct tps51632_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) { @@ -299,10 +297,8 @@ static int tps51632_probe(struct i2c_client *client, } tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); - if (!tps) { - dev_err(&client->dev, "Memory allocation failed\n"); + if (!tps) return -ENOMEM; - } tps->dev = &client->dev; tps->desc.name = client->name;