From patchwork Mon May 4 11:12:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 214699 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1B68C3A5A9 for ; Mon, 4 May 2020 11:24:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C85E320721 for ; Mon, 4 May 2020 11:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728344AbgEDLYO (ORCPT ); Mon, 4 May 2020 07:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726445AbgEDLYO (ORCPT ); Mon, 4 May 2020 07:24:14 -0400 Received: from mailout3.hostsharing.net (mailout3.hostsharing.net [IPv6:2a01:4f8:150:2161:1:b009:f236:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28EC7C061A0E for ; Mon, 4 May 2020 04:24:14 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mailout3.hostsharing.net (Postfix) with ESMTPS id 4E7A6101E69A5; Mon, 4 May 2020 13:15:57 +0200 (CEST) Received: from localhost (unknown [87.130.102.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id CA9D560F2900; Mon, 4 May 2020 13:15:56 +0200 (CEST) X-Mailbox-Line: From 689f29a359718dab4f5de9ee66c02ea97b3bd9e8 Mon Sep 17 00:00:00 2001 Message-Id: <689f29a359718dab4f5de9ee66c02ea97b3bd9e8.1588590210.git.lukas@wunner.de> In-Reply-To: References: From: Lukas Wunner Date: Mon, 4 May 2020 13:12:02 +0200 Subject: [PATCH 2/5] spi: amd: Pass probe errors back to driver core To: Mark Brown , "Sanjay R Mehta" Cc: linux-spi@vger.kernel.org Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org If probing fails, the AMD SPI driver pretends success to the driver core by returning 0. Return the errno instead. Signed-off-by: Lukas Wunner --- drivers/spi/spi-amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c index 65b53eee5be9..a4248b97b67e 100644 --- a/drivers/spi/spi-amd.c +++ b/drivers/spi/spi-amd.c @@ -294,7 +294,7 @@ static int amd_spi_probe(struct platform_device *pdev) err_free_master: spi_master_put(master); - return 0; + return err; } static int amd_spi_remove(struct platform_device *pdev)