From patchwork Fri May 10 08:42:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?44Kw44Kn44Oz44O744Ki44Oz44O744Ob44Kh44Oz?= X-Patchwork-Id: 10938377 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 7920114DB for ; Fri, 10 May 2019 08:42:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 688ED2871E for ; Fri, 10 May 2019 08:42:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59B9028B75; Fri, 10 May 2019 08:42:44 +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=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 CB0162871E for ; Fri, 10 May 2019 08:42:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727005AbfEJImn (ORCPT ); Fri, 10 May 2019 04:42:43 -0400 Received: from www3345.sakura.ne.jp ([49.212.235.55]:33599 "EHLO www3345.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726991AbfEJImn (ORCPT ); Fri, 10 May 2019 04:42:43 -0400 Received: from fsav305.sakura.ne.jp (fsav305.sakura.ne.jp [153.120.85.136]) by www3345.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x4A8gNUB045869; Fri, 10 May 2019 17:42:23 +0900 (JST) (envelope-from na-hoan@jinso.co.jp) Received: from www3345.sakura.ne.jp (49.212.235.55) by fsav305.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav305.sakura.ne.jp); Fri, 10 May 2019 17:42:23 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav305.sakura.ne.jp) Received: from localhost (p14010-ipadfx41marunouchi.tokyo.ocn.ne.jp [61.118.107.10]) (authenticated bits=0) by www3345.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x4A8gIAv045826 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 May 2019 17:42:23 +0900 (JST) (envelope-from na-hoan@jinso.co.jp) From: Nguyen An Hoan To: broonie@kernel.org, linux-rpi-kernel@lists.infradead.org, eric@anholt.net, stefan.wahren@i2se.com Cc: linux-spi@vger.kernel.org, na-hoan@jinso.co.jp Subject: [PATCH] spi: bcm2835: Remove spi_alloc_master() error printing Date: Fri, 10 May 2019 17:42:18 +0900 Message-Id: <1557477738-20634-1-git-send-email-na-hoan@jinso.co.jp> X-Mailer: git-send-email 2.7.4 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 From: Hoan Nguyen An Printing an error on memory allocation failure is unnecessary, as the memory allocation core code already takes care of that. Signed-off-by: Hoan Nguyen An Reviewed-by: Geert Uytterhoeven Reviewed-by: Martin Sperl --- drivers/spi/spi-bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 35aebdf..0b779c2 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -932,10 +932,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev) int err; master = spi_alloc_master(&pdev->dev, sizeof(*bs)); - if (!master) { - dev_err(&pdev->dev, "spi_alloc_master() failed\n"); + if (!master) return -ENOMEM; - } platform_set_drvdata(pdev, master);