From patchwork Fri Jan 18 14:11:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10770371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5676D6C5 for ; Fri, 18 Jan 2019 14:38:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 436F82A433 for ; Fri, 18 Jan 2019 14:38:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35DB12AAA9; Fri, 18 Jan 2019 14:38:51 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 E88262AAD0 for ; Fri, 18 Jan 2019 14:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727592AbfAROiu (ORCPT ); Fri, 18 Jan 2019 09:38:50 -0500 Received: from xavier.telenet-ops.be ([195.130.132.52]:54084 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727564AbfAROiu (ORCPT ); Fri, 18 Jan 2019 09:38:50 -0500 Received: from ramsan ([84.194.111.163]) by xavier.telenet-ops.be with bizsmtp id Rqen1z0073XaVaC01qentY; Fri, 18 Jan 2019 15:38:47 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1gkVIF-0007kw-1s; Fri, 18 Jan 2019 15:38:47 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1gkUrS-0007n9-BQ; Fri, 18 Jan 2019 15:11:06 +0100 From: Geert Uytterhoeven To: Mark Brown Cc: Kuninori Morimoto , linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] spi: sh-hspi: Remove error messages on out-of-memory conditions Date: Fri, 18 Jan 2019 15:11:05 +0100 Message-Id: <20190118141105.29910-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.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 There is no need to print an error message when memory allocations or related operations fail, as the core will take care of that. Signed-off-by: Geert Uytterhoeven --- drivers/spi/spi-sh-hspi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index dc0926e4366548a5..7159cb99dbe977ee 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c @@ -226,10 +226,8 @@ static int hspi_probe(struct platform_device *pdev) } master = spi_alloc_master(&pdev->dev, sizeof(*hspi)); - if (!master) { - dev_err(&pdev->dev, "spi_alloc_master error.\n"); + if (!master) return -ENOMEM; - } clk = clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { @@ -248,7 +246,6 @@ static int hspi_probe(struct platform_device *pdev) hspi->addr = devm_ioremap(hspi->dev, res->start, resource_size(res)); if (!hspi->addr) { - dev_err(&pdev->dev, "ioremap error.\n"); ret = -ENOMEM; goto error1; }