From patchwork Sat Feb 15 02:59:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 3655531 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E3C18BF13A for ; Sat, 15 Feb 2014 03:02:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C521201C7 for ; Sat, 15 Feb 2014 03:02:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CFF22018B for ; Sat, 15 Feb 2014 03:02:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751629AbaBODAs (ORCPT ); Fri, 14 Feb 2014 22:00:48 -0500 Received: from mail-yh0-f41.google.com ([209.85.213.41]:49841 "EHLO mail-yh0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbaBOC75 (ORCPT ); Fri, 14 Feb 2014 21:59:57 -0500 Received: by mail-yh0-f41.google.com with SMTP id f73so12675060yha.0 for ; Fri, 14 Feb 2014 18:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ArqvnDK1JYSZlJkURA7DZmuAF4Ga7ggzIin5hTgm+jg=; b=GQsherAiN6Ur96meXf0iXQzsEev+tqDDStzXbGsdbkq6C2a/+Nnre1x4zuc+HnPo4B bxCnn0p2f83U/kRirfIkPWCJvaHK14RiqFlW+rJ7TwBsXrYP/pqLjKbpU/1J/NA5Z2Mi zFWu9VLvT2d7qDF8mHVucoUZmDEw+fPlGTPYlwqa/btVF9Tc6ZUKTh3FTqDE0JykEkGX +XypmbzG+QGHdrZbaZ+Kf1wVVR/y0AUYw0E+am4E7FuSirTGfGGpxBStjbnYqc5pjgD3 c4k4bF/hh+nzCPaPHK5iav3SJ8g8yXnqf2YLVw7nhk9f4kdiQCUQY590ftki7QPb5Syz Wi4g== X-Received: by 10.236.16.35 with SMTP id g23mr849408yhg.53.1392433196848; Fri, 14 Feb 2014 18:59:56 -0800 (PST) Received: from localhost.localdomain ([189.5.17.129]) by mx.google.com with ESMTPSA id g26sm23514191yhk.3.2014.02.14.18.59.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 18:59:56 -0800 (PST) From: Fabio Estevam To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, Fabio Estevam Subject: [PATCH 2/2] Input: imx_keypad - Omit error message devm_kzalloc() failure Date: Sat, 15 Feb 2014 00:59:47 -0200 Message-Id: <1392433187-7756-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1392433187-7756-1-git-send-email-festevam@gmail.com> References: <1392433187-7756-1-git-send-email-festevam@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam There is no need to print an error message in the driver for devm_kzalloc() failure because OOM core code handles it properly. Signed-off-by: Fabio Estevam --- drivers/input/keyboard/imx_keypad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index de07035..40ad98d 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -450,10 +450,8 @@ static int imx_keypad_probe(struct platform_device *pdev) keypad = devm_kzalloc(&pdev->dev, sizeof(struct imx_keypad), GFP_KERNEL); - if (!keypad) { - dev_err(&pdev->dev, "not enough memory for driver data\n"); + if (!keypad) return -ENOMEM; - } keypad->input_dev = input_dev; keypad->irq = irq;