Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp299566pxb; Wed, 20 Oct 2021 23:00:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr1+qXAqfTDsRoIYSF5CVZzD7EMGcFCeZlsjLoCDMxF3hHnHCHnov+hDbxXQhRlqK6g6TS X-Received: by 2002:a63:3483:: with SMTP id b125mr2944993pga.79.1634796007344; Wed, 20 Oct 2021 23:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634796007; cv=none; d=google.com; s=arc-20160816; b=FlEQgK3It+95hTOH8g/iCf9CgGp467LuchKMhL5MqbMRcP5Y7Du4u7lajpNnsiKM1F wqisieCBUoSOMD6oPbeeAOMlCCejVGBkndIiLyovfam57ZoQmTk8A5huielC7OK+4dit 7iHakECzeWlgjTNfYC4odO8/hRP9YYexU+uwci/S28xPCAOCgLWAxUt6aBf1nPQcMPXc NdAqJ2ht+X1YWjCwpgi4bVPtMvj1E9v1ywIAeGYo/EVOO0yT3Lpbe2WRU7eAk8cPC6G7 7ZMXoH3EkneRHjfjhdp+0AZ8B8dvKt4H7hkfOL6WnfZh3tfzNRvZIFa7/urENyvAw0BL ih8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=xyYwIkMCk4rkTN8oiOVXDKTzc5USFAT81u5D/5zT+No=; b=PnDWy1Pts9vEoUO+z13g00edcMMlcIbpJ5lI323cq3NhKgByPqbQqwapv4L8oSFJYJ IDocKD6m8mmLFTCy5OTkUm5lfidCTvNPnIwtl4ATfpQoK6o+YlkLgkFeUQSvNLYN6vtk ikbLD7yyn0qI6kBpGsD4igH9DymsoQZtxy6PTEZUQQZSGzkj82hu+v0SQXRaThLRtzwF boQ6lOIuI0Mekh41nQhHLSUqou2sPhjnleaod6jWPCTKiTkfhtFBnLYmLKIXi+/6wkoi fDjRQkT5g4or9165flf4GOkiWbKU0JLtNSj+8NoQ7E7pArRKKr2ph0FL/UzBnTNBYQLy wnSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KVpo3TXn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si4849032plc.268.2021.10.20.22.59.53; Wed, 20 Oct 2021 23:00:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KVpo3TXn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230426AbhJUF7p (ORCPT + 99 others); Thu, 21 Oct 2021 01:59:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbhJUF7o (ORCPT ); Thu, 21 Oct 2021 01:59:44 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B4D8C06161C; Wed, 20 Oct 2021 22:57:29 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id i5so11510288pla.5; Wed, 20 Oct 2021 22:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=xyYwIkMCk4rkTN8oiOVXDKTzc5USFAT81u5D/5zT+No=; b=KVpo3TXnbOpA6E6xP6EBAUnwirIjDDgMOD9PlvBw6coc8vgs+tZGRkbgtKi8lLWTFe mjcyHec1DRhWjLZbnTyrE6rzzjLos9YC2rCmko+kLa7f6pD+EahDCp6C+O7ap4fBxeqT cMJQMX6y2KX5esZZ4n4gHJaXR5hYL+lpw+LWFxRhz0YUh1Ie2rsWs98scD9mI83F2HC7 l+bTa70aodAViLg0uamB0VfV/zJwteaycP4yuKkeoaTQpQTJLZMqA+jYgb6QF6Q+ku6e rfSKR52oHGR31P7//HyGDrXtUiJtH6FVqQNSXUmW3/w3o3Q5HhiTPXkrSIwrIRxUccYQ BRqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xyYwIkMCk4rkTN8oiOVXDKTzc5USFAT81u5D/5zT+No=; b=1nFHCWwKW1WlcHNmNv0F5Af8eBLT3zzzTbTU+LohPHQ6t4vrshD8MLtmCmEUC7bDIj bbTcFjYwKRV0kDbtXh0VIjuvq1OtPnwfBbOKaA6aDWPNLj1Gh1K4o8t4LUOq/9RBd/6M P2QhkLhCz9JcSpLJllzcr7f+qVNVqANfqhTYs3dIEaJMfURu4fiyU9+2gRV5oGd7Jwlt YcVpANbOljMUh2+OmX40au321WPVndpgDY4eNGwSLTlMOC0GjGveto5RXeZWrdmr+hF+ zwXvF1q25160ETXAKD5G+5PEuwUYUZ+dBwjb9jUw8KFgkH1wvxrXb8WtoAX9kUp5aEeB siRQ== X-Gm-Message-State: AOAM533B3PcMwWbVDi/qnDPbDJF0czBjZrZX5nI2FzaBcRcQkEFsp/xl JSSlu3inDfbLSCBNxRE7Yg== X-Received: by 2002:a17:90a:ba88:: with SMTP id t8mr4291321pjr.15.1634795848845; Wed, 20 Oct 2021 22:57:28 -0700 (PDT) Received: from vultr.guest ([107.191.53.97]) by smtp.gmail.com with ESMTPSA id h14sm782467pfv.182.2021.10.20.22.57.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Oct 2021 22:57:28 -0700 (PDT) From: Zheyu Ma To: damien.lemoal@opensource.wdc.com Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Zheyu Ma Subject: [PATCH] ata: sata_mv: Fix the return value of the probe function Date: Thu, 21 Oct 2021 05:57:16 +0000 Message-Id: <1634795836-1803-1-git-send-email-zheyuma97@gmail.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mv_init_host() propagates the value returned by mv_chip_id() which in turn gets propagated by mv_pci_init_one() and hits local_pci_probe(). During the process of driver probing, the probe function should return < 0 for failure, otherwise, the kernel will treat value > 0 as success. Signed-off-by: Zheyu Ma --- drivers/ata/sata_mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 9d86203e1e7a..7461fe078dd1 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -3897,7 +3897,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx) default: dev_err(host->dev, "BUG: invalid board index %u\n", board_idx); - return 1; + return -ENODEV; } hpriv->hp_flags = hp_flags; -- 2.17.6