From patchwork Fri Aug 15 12:40:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 35454 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3035A23917 for ; Fri, 15 Aug 2014 12:40:29 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf6227239qac.4 for ; Fri, 15 Aug 2014 05:40:29 -0700 (PDT) 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=VMChPy6IKnlejcIhMrQ8d0R18OBqnlCCsJHUXxNomz0=; b=NK0WHAhew4QmfN2hExrAo5HZukh32xRML74EHVOWK2GNE46r36YrnFSsFBKmzbc7qq rSdu/ajp1L1n68zvpODyVVl7cvd2p9Fk4U5HtcF06kp55wyT+/YAEvlZ3De1YBnXttoU fU7aJ9/UZ65mQPx4kBMbmWqXSPvED4p3kLAKjl3qI1dWkQL9Zw91UYMdJWHKRuYn+tss Mp6XZ5GttTctzvKfxhlGsFekgI1guwM6xzIYOBD3mtp0oeO8vLTAOLOi9RWO+aj9Ym5U CzitBuJPJj1ujJLLX2Xt9jBbq5jSaZiyUl7KefHg+oMJPMVEAhRlMGpwF0aGs06g8x8U PD9Q== X-Gm-Message-State: ALoCoQnTjneRdvUxgKA9h4kjqcwNH2PxjiZKvcLoUniULOoOQxmy82HqAI2XYTst4ZpeGiF+/Wuw X-Received: by 10.236.155.132 with SMTP id j4mr14275yhk.56.1408106429039; Fri, 15 Aug 2014 05:40:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.80 with SMTP id s74ls1424072qgs.64.gmail; Fri, 15 Aug 2014 05:40:28 -0700 (PDT) X-Received: by 10.229.211.132 with SMTP id go4mr27531627qcb.0.1408106428944; Fri, 15 Aug 2014 05:40:28 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id g5si11652098qge.57.2014.08.15.05.40.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 05:40:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ik5so2804986vcb.6 for ; Fri, 15 Aug 2014 05:40:28 -0700 (PDT) X-Received: by 10.220.199.193 with SMTP id et1mr201540vcb.58.1408106428673; Fri, 15 Aug 2014 05:40:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp109565vcb; Fri, 15 Aug 2014 05:40:28 -0700 (PDT) X-Received: by 10.194.119.41 with SMTP id kr9mr4056853wjb.114.1408106427504; Fri, 15 Aug 2014 05:40:27 -0700 (PDT) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by mx.google.com with ESMTPS id ga3si2499284wib.18.2014.08.15.05.40.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 05:40:27 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 209.85.212.180 as permitted sender) client-ip=209.85.212.180; Received: by mail-wi0-f180.google.com with SMTP id n3so766998wiv.7 for ; Fri, 15 Aug 2014 05:40:27 -0700 (PDT) X-Received: by 10.180.97.101 with SMTP id dz5mr8489164wib.52.1408106427096; Fri, 15 Aug 2014 05:40:27 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id fr2sm6486559wib.7.2014.08.15.05.40.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Aug 2014 05:40:26 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kishon@ti.com, kgene.kim@samsung.com, maxime.ripard@free-electrons.com, linux-samsung-soc@vger.kernel.org Cc: peter.griffin@linaro.org, patches@linaro.org, lee.jones@linaro.org Subject: [PATCH 3/9] phy: phy-omap-usb2: Remove unncessary site specific OOM messages Date: Fri, 15 Aug 2014 13:40:10 +0100 Message-Id: <1408106416-19044-4-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org> References: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The site specific OOM messages are unncessary, because they duplicate messages from the memory subsystem which include dump_stack(). Removing these superflous messages makes the kernel smaller. A discussion here http://patchwork.ozlabs.org/patch/324158/ found that all error paths from kzalloc will print a error message, and that any error path which maybe found which doesn't would be considered a bug in kzalloc. Signed-off-by: Peter Griffin --- drivers/phy/phy-omap-usb2.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 93d7835..51c6f92 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c @@ -212,16 +212,12 @@ static int omap_usb2_probe(struct platform_device *pdev) phy_data = (struct usb_phy_data *)of_id->data; phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL); - if (!phy) { - dev_err(&pdev->dev, "unable to allocate memory for USB2 PHY\n"); + if (!phy) return -ENOMEM; - } otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL); - if (!otg) { - dev_err(&pdev->dev, "unable to allocate memory for USB OTG\n"); + if (!otg) return -ENOMEM; - } phy->dev = &pdev->dev;