From patchwork Fri Jun 13 04:47:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 4346811 Return-Path: X-Original-To: patchwork-linux-spi@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 61E7DBEEAA for ; Fri, 13 Jun 2014 04:50:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 907CD20263 for ; Fri, 13 Jun 2014 04:50:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B399420254 for ; Fri, 13 Jun 2014 04:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751224AbaFMEuh (ORCPT ); Fri, 13 Jun 2014 00:50:37 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:45046 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbaFMEuh (ORCPT ); Fri, 13 Jun 2014 00:50:37 -0400 Received: by mail-pb0-f44.google.com with SMTP id md12so933110pbc.3 for ; Thu, 12 Jun 2014 21:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=os8ZzEWg8WM0pyIBc28vioR5ZwtYAMtsecbzXFI494o=; b=NA/nNk0dFwOX5TNs2kBR3utcU4gqa03ITA+PtKxLajeqPMG99MH/OG0w2XR7wXQ3di 18Pu0X67KSdWOo7WMYdcH5mMdeNCjV1qHHp/ZOlKPNMggKv2Jk1cbATkC+Ayb/L6DFGu tP/Zy1idqItTyxIHDXQTEvYkftSHjOywwXoUMZ3NxYOjnmbYRf9QBi0JcsjP7BXyc9ow 6WlN5+boCUrLIeJhnwqz4FRUR9GZ99XNIFJq0b92WZc8j+GbbVGUAqJNsVFt8FYdfJ1b 1U+ZPadErvj1ZMRUNxXpfQk3qG8ejXYqiC1vPbJYbMX/gOJ9WVjSEQU4HQEtjf0IURGh tlBg== X-Received: by 10.68.135.67 with SMTP id pq3mr247006pbb.165.1402635036630; Thu, 12 Jun 2014 21:50:36 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id vf9sm1061378pbc.94.2014.06.12.21.50.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 21:50:35 -0700 (PDT) From: Sachin Kamat To: linux-spi@vger.kernel.org Cc: broonie@kernel.org, spk.linux@gmail.com Subject: [PATCH 1/2] spi: spi-adi-v3: Remove redundant OOM message Date: Fri, 13 Jun 2014 10:17:41 +0530 Message-Id: <1402634862-21783-1-git-send-email-sachin.kamat@samsung.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 Let memory subsystem do the error logging. Signed-off-by: Sachin Kamat Reviewed-by: Naveen Krishna Chatradhi --- drivers/spi/spi-adi-v3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-adi-v3.c b/drivers/spi/spi-adi-v3.c index dcb2287c7f8a..19ea8fb78cc7 100644 --- a/drivers/spi/spi-adi-v3.c +++ b/drivers/spi/spi-adi-v3.c @@ -660,10 +660,9 @@ static int adi_spi_setup(struct spi_device *spi) struct adi_spi3_chip *chip_info = spi->controller_data; chip = kzalloc(sizeof(*chip), GFP_KERNEL); - if (!chip) { - dev_err(&spi->dev, "can not allocate chip data\n"); + if (!chip) return -ENOMEM; - } + if (chip_info) { if (chip_info->control & ~ctl_reg) { dev_err(&spi->dev,