From patchwork Wed Jan 4 10:15:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9496401 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BCEFC60413 for ; Wed, 4 Jan 2017 10:15:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A402527D9B for ; Wed, 4 Jan 2017 10:15:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9896627E15; Wed, 4 Jan 2017 10:15:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2070427DF9 for ; Wed, 4 Jan 2017 10:15:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753570AbdADKPP (ORCPT ); Wed, 4 Jan 2017 05:15:15 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:37772 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbdADKPP (ORCPT ); Wed, 4 Jan 2017 05:15:15 -0500 Received: from ayla.of.borg ([84.193.137.253]) by albert.telenet-ops.be with bizsmtp id UAFD1u00A5UCtCs06AFDX2; Wed, 04 Jan 2017 11:15:13 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1cOibB-0003JL-92; Wed, 04 Jan 2017 11:15:13 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1cOibB-0008Sl-Cs; Wed, 04 Jan 2017 11:15:13 +0100 From: Geert Uytterhoeven To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/2] spi: rspi: Remove useless memory allocation failure message Date: Wed, 4 Jan 2017 11:15:07 +0100 Message-Id: <1483524908-32497-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Printing an error on memory allocation failure is unnecessary. Signed-off-by: Geert Uytterhoeven --- drivers/spi/spi-rspi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 48b0d2162ae62da3..2af58a72d702bf17 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -1227,10 +1227,8 @@ static int rspi_probe(struct platform_device *pdev) const struct spi_ops *ops; master = spi_alloc_master(&pdev->dev, sizeof(struct rspi_data)); - if (master == NULL) { - dev_err(&pdev->dev, "spi_alloc_master error.\n"); + if (master == NULL) return -ENOMEM; - } of_id = of_match_device(rspi_of_match, &pdev->dev); if (of_id) {