From patchwork Fri Aug 8 07:14:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kiran.padwal@smartplayin.com X-Patchwork-Id: 4694501 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0ED0A9F377 for ; Fri, 8 Aug 2014 07:26:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45F062017A for ; Fri, 8 Aug 2014 07:26:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A8D52016C for ; Fri, 8 Aug 2014 07:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755918AbaHHH0n (ORCPT ); Fri, 8 Aug 2014 03:26:43 -0400 Received: from smtp96.ord1c.emailsrvr.com ([108.166.43.96]:43109 "EHLO smtp96.ord1c.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbaHHH0l (ORCPT ); Fri, 8 Aug 2014 03:26:41 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id B66F91802A1; Fri, 8 Aug 2014 03:17:54 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: kiran.padwal-AT-smartplayin.com) with ESMTPSA id B8B4F180165; Fri, 8 Aug 2014 03:17:51 -0400 (EDT) X-Sender-Id: kiran.padwal@smartplayin.com Received: from SPINITDTDL00291.smartplayin.local ([UNAVAILABLE]. [220.227.185.53]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:587 (trex/5.2.10); Fri, 08 Aug 2014 07:17:54 GMT From: Kiran Padwal To: support.opensource@diasemi.com, dmitry.torokhov@gmail.com Cc: anthony.olech.opensource@diasemi.com, david.chen@diasemi.com, kiran.padwal21@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Kiran Padwal Subject: [PATCH 1/2] Input: da9055_onkey: Remove unnecessary OOM meassage Date: Fri, 8 Aug 2014 12:44:57 +0530 Message-Id: <1407482097-17624-1-git-send-email-kiran.padwal@smartplayin.com> X-Mailer: git-send-email 1.7.9.5 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 There is no need to print out-of-memory errors since this is already done by the memory management subsystem which even calls dump_stack(). Signed-off-by: Kiran Padwal --- drivers/input/misc/da9055_onkey.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c index 4765799..ed6eaa9 100644 --- a/drivers/input/misc/da9055_onkey.c +++ b/drivers/input/misc/da9055_onkey.c @@ -87,10 +87,8 @@ static int da9055_onkey_probe(struct platform_device *pdev) } onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); - if (!onkey) { - dev_err(&pdev->dev, "Failed to allocate memory\n"); + if (!onkey) return -ENOMEM; - } input_dev = input_allocate_device(); if (!input_dev) {