From patchwork Thu Jan 8 10:50:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 426562 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EDFF5140119 for ; Thu, 8 Jan 2015 21:50:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754289AbbAHKuE (ORCPT ); Thu, 8 Jan 2015 05:50:04 -0500 Received: from mga09.intel.com ([134.134.136.24]:14585 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756233AbbAHKuD (ORCPT ); Thu, 8 Jan 2015 05:50:03 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 08 Jan 2015 02:47:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,721,1413270000"; d="scan'208";a="648076773" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.90]) by fmsmga001.fm.intel.com with ESMTP; 08 Jan 2015 02:50:00 -0800 Received: from andy by smile with local (Exim 4.84) (envelope-from ) id 1Y9AfO-0004QC-Ue; Thu, 08 Jan 2015 12:50:14 +0200 From: Andy Shevchenko To: Rupjyoti Sarmah , Tejun Heo , linux-ide@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 2/3] sata_dwc_460ex: remove extra message Date: Thu, 8 Jan 2015 12:50:13 +0200 Message-Id: <1420714214-16950-2-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1420714214-16950-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1420714214-16950-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org There is no need to print a message about failure of memory allocation. The caller will get an error code and may print the same. Signed-off-by: Andy Shevchenko --- drivers/ata/sata_dwc_460ex.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index b206017..169cbca 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -1677,11 +1677,8 @@ static int sata_dwc_probe(struct platform_device *ofdev) /* Allocate DWC SATA device */ hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL); - if (hsdev == NULL) { - dev_err(&ofdev->dev, "kmalloc failed for hsdev\n"); - err = -ENOMEM; - goto error; - } + if (hsdev == NULL) + return -ENOMEM; if (of_property_read_u32(np, "dma-channel", &dma_chan)) { dev_warn(&ofdev->dev, "no dma-channel property set." @@ -1783,7 +1780,6 @@ error_iomap: iounmap(base); error_kmalloc: kfree(hsdev); -error: return err; }