Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1552941pxb; Thu, 16 Sep 2021 09:46:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrwUoUd1aYYvIllycNhapBKZmzEQe4ntn73FyjnvSWYZZsPM/jhAgtlOyfWwy99pBhDF6M X-Received: by 2002:a17:907:3e20:: with SMTP id hp32mr7152397ejc.536.1631810783878; Thu, 16 Sep 2021 09:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631810783; cv=none; d=google.com; s=arc-20160816; b=aARa0+Usj6hD8x8xw5AWUHgpmno91h4iA5yUsrnx0scJo6HUyyQkjP86JkDMM7jOLb H5yJQQIO8KCC06tHHdyn+a63GOkZdgMyBeK4lOPCmoY8DJiyKHFBFgy0SoBct+ol9n77 udBeXbYQD94rT6Y1Plp8cFgbSzgkl4FCE4gAwqLum3TIBgx8nnlSMtXta+wkXvdBqbMy 2HJrz9WobDUB8ISB2ldSCb77NGSg6UF6G2Jjc2J/DQveQOr6v+wyTPLlVOcY1IMI0Cga IgnLFS/4BCKmPDoYRgwSLBo/91hqNbqR38Dzm+NI45aCf9pGKy8pHy3ipS8tIbFZBMKY 9Bvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KyZ42bnA8MQJCDCrFRaIPvTWp3WUXh6sT8Ij5ivl6rw=; b=uwdMiRDtEFubeNlWMw4tDN5kTZ91oqpXizWNz8ee53a7QP4RL+02pOpsJQuLjOYYgI zrMu8Aum39ETtBVPVk+T1gZTM7Ku13t3pHAAAUpCOYseh+RtTv15p5ekqKl6twYKv+D5 Q4Dt0/bERVxWEw2oopscz3IerfsG2fUfzQxipvlhvaw9DFEJbqktoAcUf7e1mKKF+8XQ EPk5PqgL55MEU0mWT7KJOLo8bE2LaVqS+g8mPAvhkp9TBxNNrNd559cxv+/EeD+x3K9O jk/nA10BEiyYumpFfQNfcJpYYQ2JUnjxvF/O7OhQNvtUYN2NeolVy1Uvbp9hJ8qfBQCU pxYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uwLAV0rH; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si4992871eje.454.2021.09.16.09.45.57; Thu, 16 Sep 2021 09:46:23 -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=@linuxfoundation.org header.s=korg header.b=uwLAV0rH; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241975AbhIPQmK (ORCPT + 99 others); Thu, 16 Sep 2021 12:42:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:44970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242555AbhIPQfq (ORCPT ); Thu, 16 Sep 2021 12:35:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B08561108; Thu, 16 Sep 2021 16:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809295; bh=7jspRymjruWv8ZVQQoIyyjjJyKqgfsOq/RILWjA1krM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uwLAV0rHHPSsj7nKOH7H3/+NRlfTJNjSwfPWHHIpswAerD2plMQALLCV0GS1IECZB +SmjtT7EJF4bs4PB1EW4hOSP/MFEzmwxX4pS6M8ZEqyce2QP6P+f4F1UfrTf2OQxw7 +Zeq+YDIjX/3Y4RHv3muClkuX7OnAksQv9AjvKxU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wei Li , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.13 101/380] scsi: fdomain: Fix error return code in fdomain_probe() Date: Thu, 16 Sep 2021 17:57:38 +0200 Message-Id: <20210916155807.470689965@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Li [ Upstream commit 632c4ae6da1d629eddf9da1e692d7617c568c256 ] If request_region() fails the return value is not set. Return -EBUSY on error. Link: https://lore.kernel.org/r/20210715032625.1395495-1-liwei391@huawei.com Fixes: 8674a8aa2c39 ("scsi: fdomain: Add PCMCIA support") Reported-by: Hulk Robot Signed-off-by: Wei Li Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/pcmcia/fdomain_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/pcmcia/fdomain_cs.c b/drivers/scsi/pcmcia/fdomain_cs.c index e42acf314d06..33df6a9ba9b5 100644 --- a/drivers/scsi/pcmcia/fdomain_cs.c +++ b/drivers/scsi/pcmcia/fdomain_cs.c @@ -45,8 +45,10 @@ static int fdomain_probe(struct pcmcia_device *link) goto fail_disable; if (!request_region(link->resource[0]->start, FDOMAIN_REGION_SIZE, - "fdomain_cs")) + "fdomain_cs")) { + ret = -EBUSY; goto fail_disable; + } sh = fdomain_create(link->resource[0]->start, link->irq, 7, &link->dev); if (!sh) { -- 2.30.2