From patchwork Tue Feb 18 10:41:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24822 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F482203C5 for ; Tue, 18 Feb 2014 10:47:17 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf69136055oag.1 for ; Tue, 18 Feb 2014 02:47:16 -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=KTRcqj8Gh3sdYA4qGscAJZI6cIwMm39jieBwBgZ0aVU=; b=HGVgM6eTTEQL0gVOewlIJzVDayIgJ2bXvcHwci3iqZ8foBObT70EFF+WjFmKN+ZnzU q8jRowV4TNlrAZ44CyCOPmCrQC7VDD++Evx53GEh5W8oj2PnvAgYJQhgZ36nV5/31pHg yRUodnep0guXrMgTaApJUg1kVTjk6FnSUB9xP/vfLgbE0IW0GNgCVTW7Wyq/0H84IZp9 qgFpl7Ck67P208ml8Lm4nfDjZc1u3x+/Plk5F/JkDUnuLrkot463UbhmLhit6I1/hP7/ zEW3dFQroIDOFnrehZWgV6aA2TeQ7FjTUzUlaZXXhyG32QdFa4AJA8ZZYsN+wfSEFmGj DFNg== X-Gm-Message-State: ALoCoQn+2hHvxRn3Vu0ILYw9Ag1xumxEKexb7E8ZrUBp2VTs7Bi1rpN7lTwKiaSOWUN0Qs0Edsxs X-Received: by 10.182.66.73 with SMTP id d9mr12600252obt.8.1392720436363; Tue, 18 Feb 2014 02:47:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.199 with SMTP id d65ls1269867qge.12.gmail; Tue, 18 Feb 2014 02:47:16 -0800 (PST) X-Received: by 10.52.166.103 with SMTP id zf7mr13288292vdb.30.1392720436216; Tue, 18 Feb 2014 02:47:16 -0800 (PST) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id sx1si5369405vdc.75.2014.02.18.02.47.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:47:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id jx11so13533885veb.10 for ; Tue, 18 Feb 2014 02:47:16 -0800 (PST) X-Received: by 10.52.107.35 with SMTP id gz3mr17203669vdb.8.1392720436142; Tue, 18 Feb 2014 02:47:16 -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 u4csp207192vcz; Tue, 18 Feb 2014 02:47:15 -0800 (PST) X-Received: by 10.66.221.103 with SMTP id qd7mr31926369pac.44.1392720435279; Tue, 18 Feb 2014 02:47:15 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wm3si17866986pab.252.2014.02.18.02.47.14; Tue, 18 Feb 2014 02:47:14 -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 S1754760AbaBRKrE (ORCPT + 27 others); Tue, 18 Feb 2014 05:47:04 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:55752 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754981AbaBRKqx (ORCPT ); Tue, 18 Feb 2014 05:46:53 -0500 Received: by mail-pa0-f54.google.com with SMTP id fa1so16681284pad.27 for ; Tue, 18 Feb 2014 02:46:53 -0800 (PST) X-Received: by 10.66.13.138 with SMTP id h10mr9147130pac.148.1392720412947; Tue, 18 Feb 2014 02:46:52 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id gj9sm5442084pbc.7.2014.02.18.02.46.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:46:51 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 04/15] regulator: max8973: Remove redundant error message Date: Tue, 18 Feb 2014 16:11:00 +0530 Message-Id: <1392720071-13503-4-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1392720071-13503-1-git-send-email-sachin.kamat@linaro.org> References: <1392720071-13503-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.179 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/max8973-regulator.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c index 892aa1e5b96c..79f57fef0038 100644 --- a/drivers/regulator/max8973-regulator.c +++ b/drivers/regulator/max8973-regulator.c @@ -379,10 +379,8 @@ static int max8973_probe(struct i2c_client *client, } max = devm_kzalloc(&client->dev, sizeof(*max), GFP_KERNEL); - if (!max) { - dev_err(&client->dev, "Memory allocation for max failed\n"); + if (!max) return -ENOMEM; - } max->regmap = devm_regmap_init_i2c(client, &max8973_regmap_config); if (IS_ERR(max->regmap)) {