From patchwork Thu Feb 20 08:53:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 24980 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 553302066E for ; Thu, 20 Feb 2014 08:59:45 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id kq14sf4052270pab.9 for ; Thu, 20 Feb 2014 00:59:43 -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=SHZFJfkNtREBxuJdI8zy5sV39S5wfx5jzo2Ih8Nh4+M=; b=bxOJaTNESIdRBM644RmChnA05eRFCoLTU/o2YknkPqIk3fA5dWDY4cogbMZk6OYNpC 7Tn0qlVIp75puBTsoUK+tMMPVsHZvRanxUJEF8zHmaX48OHp7QP/vVXt4eDBEgB6hjRe p25ZcgQ3on87KxELbRqsq4BxlSrnFolGvm0Tey+hesnu4v/InKp9uwREsZeO9BGxArO0 9/SnQPbOJQSIjVc/auHN4M/WhOZSXtxezpH1tIzdl3Mrr5EHZU/hw9ZAzhUnvams2/t7 T/nWZF/i1oZwoPiOJ4RtCiglE+uWaMubFjn6dxkab5AMoIMGktxg55UhzkrxXnArp8Z9 lCYg== X-Gm-Message-State: ALoCoQlkEUGQBWbs997MuPdOisLQqP6qpMvM4n41UmUp4hvxvPA87qvYKAyfQ/ue+x/ALNpLiSlq X-Received: by 10.66.252.198 with SMTP id zu6mr245453pac.25.1392886783724; Thu, 20 Feb 2014 00:59:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.33 with SMTP id 30ls448761qgs.22.gmail; Thu, 20 Feb 2014 00:59:43 -0800 (PST) X-Received: by 10.220.109.1 with SMTP id h1mr383802vcp.20.1392886783523; Thu, 20 Feb 2014 00:59:43 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id tr5si1201203vdc.52.2014.02.20.00.59.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:43 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.176 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.176; Received: by mail-ve0-f176.google.com with SMTP id jx11so1540637veb.7 for ; Thu, 20 Feb 2014 00:59:43 -0800 (PST) X-Received: by 10.220.106.84 with SMTP id w20mr382801vco.18.1392886783448; Thu, 20 Feb 2014 00:59:43 -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 u4csp40756vcz; Thu, 20 Feb 2014 00:59:43 -0800 (PST) X-Received: by 10.67.22.100 with SMTP id hr4mr719755pad.112.1392886782569; Thu, 20 Feb 2014 00:59:42 -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.41; Thu, 20 Feb 2014 00:59:41 -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 S1754732AbaBTI7Q (ORCPT + 26 others); Thu, 20 Feb 2014 03:59:16 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:33878 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955AbaBTI7M (ORCPT ); Thu, 20 Feb 2014 03:59:12 -0500 Received: by mail-pd0-f180.google.com with SMTP id x10so1565683pdj.11 for ; Thu, 20 Feb 2014 00:59:11 -0800 (PST) X-Received: by 10.66.129.133 with SMTP id nw5mr745612pab.98.1392886751786; Thu, 20 Feb 2014 00:59:11 -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.09 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 00:59:11 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, lgirdwood@gmail.com, sachin.kamat@linaro.org Subject: [PATCH 07/23] regulator: max8907: Remove redundant error message Date: Thu, 20 Feb 2014 14:23:07 +0530 Message-Id: <1392886403-10640-7-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.176 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/max8907-regulator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index afda8c6af721..ed90c759c231 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -292,10 +292,9 @@ static int max8907_regulator_probe(struct platform_device *pdev) return ret; pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); - if (!pmic) { - dev_err(&pdev->dev, "Failed to alloc pmic\n"); + if (!pmic) return -ENOMEM; - } + platform_set_drvdata(pdev, pmic); memcpy(pmic->desc, max8907_regulators, sizeof(pmic->desc));