From patchwork Tue Feb 18 10:40:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24835 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DE384203C5 for ; Tue, 18 Feb 2014 10:51:03 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id fp1sf36062859pdb.10 for ; Tue, 18 Feb 2014 02:51:03 -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=ofD7UFL+gF9OsKhc0uFvF7tYIYIktUxrdBljo3EnXYY=; b=J+JvwPyOFoQwJuXav3vi/DJgLNa2kLmdkAIu9hyZa9saYd3+3HPakEpNZaGqTbxLh3 LK5DViTcNwnPWBMY9ZTht3IZrQuhH4bRJrsY75xNlBU4UKKKysunaQ0hPGc2ayOlMALa WX7UOGtMqgMT5QEH+RHmbCHd/rVYHApH2n0J4pOVND/3wfuM/l6HOU09vTwABXiB+WG+ D9szV44KoL0VfYInW6kc46M1Y33A5XiEjLOmvlo7PhwyFtzJ88oFp/wTthAiianUEpKo 5+XAHoePC/1I+sXOOOOTGsoDve9MNsgPwcvuGbHJ/lQW6i/uC1FB1ScWfnLc92Yjpoi8 tLRQ== X-Gm-Message-State: ALoCoQkJlkO8pU5KSg0PAV5zk9r3pR4oe9I1pS8z6J+K+2Q/tdzIsEErT8B6Vb1itgalSfcn/Sxw X-Received: by 10.66.197.167 with SMTP id iv7mr10331697pac.12.1392720663134; Tue, 18 Feb 2014 02:51:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.165 with SMTP id l34ls1190062qgd.5.gmail; Tue, 18 Feb 2014 02:51:03 -0800 (PST) X-Received: by 10.52.236.132 with SMTP id uu4mr4039132vdc.47.1392720662688; Tue, 18 Feb 2014 02:51:02 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id l4si5387457vch.54.2014.02.18.02.51.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:51:02 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 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.170; Received: by mail-vc0-f170.google.com with SMTP id hu8so13029702vcb.15 for ; Tue, 18 Feb 2014 02:51:02 -0800 (PST) X-Received: by 10.53.9.107 with SMTP id dr11mr7265171vdd.1.1392720662562; Tue, 18 Feb 2014 02:51:02 -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 u4csp207401vcz; Tue, 18 Feb 2014 02:51:02 -0800 (PST) X-Received: by 10.68.162.66 with SMTP id xy2mr32341457pbb.46.1392720661674; Tue, 18 Feb 2014 02:51:01 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yg10si17870589pbc.302.2014.02.18.02.51.00; Tue, 18 Feb 2014 02:51:00 -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 S1755336AbaBRKuy (ORCPT + 27 others); Tue, 18 Feb 2014 05:50:54 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:46554 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754932AbaBRKqt (ORCPT ); Tue, 18 Feb 2014 05:46:49 -0500 Received: by mail-pa0-f51.google.com with SMTP id ld10so16616232pab.38 for ; Tue, 18 Feb 2014 02:46:48 -0800 (PST) X-Received: by 10.68.171.99 with SMTP id at3mr32066649pbc.109.1392720408478; Tue, 18 Feb 2014 02:46:48 -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.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Feb 2014 02:46: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 03/15] regulator: ti-abb: Remove redundant error message Date: Tue, 18 Feb 2014 16:10:59 +0530 Message-Id: <1392720071-13503-3-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.220.170 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/ti-abb-regulator.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c index 75fa64769b4b..a2dabb575b97 100644 --- a/drivers/regulator/ti-abb-regulator.c +++ b/drivers/regulator/ti-abb-regulator.c @@ -533,20 +533,15 @@ static int ti_abb_init_table(struct device *dev, struct ti_abb *abb, num_entries /= num_values; info = devm_kzalloc(dev, sizeof(*info) * num_entries, GFP_KERNEL); - if (!info) { - dev_err(dev, "Can't allocate info table for '%s' property\n", - pname); + if (!info) return -ENOMEM; - } + abb->info = info; volt_table = devm_kzalloc(dev, sizeof(unsigned int) * num_entries, GFP_KERNEL); - if (!volt_table) { - dev_err(dev, "Can't allocate voltage table for '%s' property\n", - pname); + if (!volt_table) return -ENOMEM; - } abb->rdesc.n_voltages = num_entries; abb->rdesc.volt_table = volt_table;