Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1566574pxb; Wed, 20 Oct 2021 07:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLj1aqP2dR9imCP8qwpiYJcC8xFV3gE4/rfWTlUhDSoE4gotnE6mEBJNLtyut3oHJ+z5k2 X-Received: by 2002:a05:6402:2684:: with SMTP id w4mr484648edd.108.1634740553184; Wed, 20 Oct 2021 07:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634740553; cv=none; d=google.com; s=arc-20160816; b=i2hHDxt9REHPpLBcW4YsydaSkVxR1eb/E+KON5V39wHqrcQoaIIK8L0yzOQPlPasBR AoGlVSTfY4lF/q8AgDlk9ymHTvXAzpvwdPPfNfrWgvXgoqhCVgTyuyH4NFxes8zIlEI8 CTrztWebMuFNz7EaUopH8BjK2VW0dGPiLJZgHWjQ/481bndm6ja9wT1oS0w+lAh/iMkU h6jT0rfu+GqX0EwCBt/z7enPTNOOyl+hR4wzxKTby4o13Av8b8kIiLuBR1FaNVhSRtFV mHw5j5hYqLUK18VvOEZeeQqlDI5hmIcPrFJlh/VgxEj8ubWMnEH/y++hc4geeTZbuJza jVWw== 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=u5DOSeHOTZkZZGLPLKG3YA5D+MxgiJ7IvT74eqMUdzw=; b=rWaLAbzxVTeGVF9dRV7OfHyHV/epFiWAJ23dZsJustcg6t0IU6z4H/oOdTBKCWmm/W ZT7xq1t/yWi9wVvQ6bucDgvDudwsEvBVe/ggRJmVmGJ8VnnGXstESURbN1Vur78NxfGU bnfhUBGZ9J7KU5Eo1voxh9LJrdWB/IfOdnhryWC67lPar6emk0n+4sbwhrrofmx1Sp/I 5LEdZrP6WOB4uq/0jylbXrrZI4g3spXBX11kgLfoGAIa7qqB/dx02qaD41p4Q3tij+tq UgUzubz77dyqseXH9ntBWYSPN8uAPJwHYVnKYrsvnYrzTl0Q9FzjwdV8D6XOcO9DnVs8 7SNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="HzuNKj/M"; 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 sh9si3757652ejc.389.2021.10.20.07.35.14; Wed, 20 Oct 2021 07:35:53 -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="HzuNKj/M"; 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 S230182AbhJTOfc (ORCPT + 99 others); Wed, 20 Oct 2021 10:35:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbhJTOfc (ORCPT ); Wed, 20 Oct 2021 10:35:32 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6F87C06161C; Wed, 20 Oct 2021 07:33:17 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id 21so16254960plo.13; Wed, 20 Oct 2021 07:33:17 -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=u5DOSeHOTZkZZGLPLKG3YA5D+MxgiJ7IvT74eqMUdzw=; b=HzuNKj/Mo6lAcoORCX1FT11zc2x+2AFTBDIOP1iv/agUSbtHcKhtP7H5k4Y+ErSPXO COTzAd9fT0AEzLNM/AELcAZWfOq597E88L2Ohm9Asmy/IGsVsZT5Kvm1xc5eaWZ0nbWb 6YAiIABRtMvBDosZPcxUtpFY6g0R86HCkUL8y/JFN4vE0D2aAerboa0oeCukNQHpLuG7 tV2bn/vRPJSP6s3WQ7e6Naksyx11pbUe1gmhuVO7ttuG/TZMr8DFoNSSSbkLdbG4UIvC aDkCZK4vC0Ma1ByjaZr4KaQmj1hAChZdGjzWQsjGVHM/Io06QS2axKhmoUIYtdrVVdGg klHg== 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=u5DOSeHOTZkZZGLPLKG3YA5D+MxgiJ7IvT74eqMUdzw=; b=x4feP+91VS9e5pfrhPkyST4PzLWmKz9GvP1lff58a35qTqOP3R6HOIoeBRDJWihOuP rN3H5ZgaXO14JVfYvIQS3J9pU8l6AOVc1IXT24fKPTaL3Pq24R79Z4IBZF0OmqNiPCCI 2GtLhlQnlzSIJM4uL8BFk1JwXdom4d7+DSlkWJKi8wVCS9Ek6F7+OCqGCzG9UB5r8DJ2 SQ7Jvh9mpID+rjqy0LPMdKNiI9/ttYumMLCYNNCuUpN/sG7u1ZOl/HimPYqBFnpPIvB2 oSDYTBbR/Vu2osXJTtTfq6bEYNz+eSMx02efsI6JGNXYXKmkZHlbKkBReKOWiiJWZ2Cw +sVA== X-Gm-Message-State: AOAM531ygqFUCIJIe1RyGIj/UqzWRu468GiWY7qDvnKIRYUtVsX3mBrQ usr+tNetycOVT6BDt4G8MA== X-Received: by 2002:a17:90b:30d6:: with SMTP id hi22mr8001207pjb.4.1634740397380; Wed, 20 Oct 2021 07:33:17 -0700 (PDT) Received: from vultr.guest ([107.191.53.97]) by smtp.gmail.com with ESMTPSA id j9sm2512018pji.20.2021.10.20.07.33.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Oct 2021 07:33:16 -0700 (PDT) From: Zheyu Ma To: jejb@linux.ibm.com, martin.petersen@oracle.com, skashyap@marvell.com, jhasan@marvell.com, GR-QLogic-Storage-Upstream@marvell.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Zheyu Ma Subject: [PATCH] scsi: qedf: Fix return values of the probe function Date: Wed, 20 Oct 2021 14:33:08 +0000 Message-Id: <1634740388-27238-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 qedf_set_fcoe_pf_param() propagates the return value to the probe function __qedf_probe() and then 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/scsi/qedf/qedf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 42d0d941dba5..52f2a52bea2c 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3161,14 +3161,14 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx *qedf) if (!qedf->p_cpuq) { QEDF_ERR(&(qedf->dbg_ctx), "dma_alloc_coherent failed.\n"); - return 1; + return -ENOMEM; } rval = qedf_alloc_global_queues(qedf); if (rval) { QEDF_ERR(&(qedf->dbg_ctx), "Global queue allocation " "failed.\n"); - return 1; + return rval; } /* Calculate SQ PBL size in the same manner as in qedf_sq_alloc() */ -- 2.17.6