From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AD546FA7 for ; Sun, 17 Sep 2023 19:18:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72D5DC433C7; Sun, 17 Sep 2023 19:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694978332; bh=fyVld1xhDCdhh8+feF6iRAhnZImBu8cyYRxQEZPXfpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UPjkmmWgVybpgSVklb1A2byUKmNPxxWCn9tLY5Quxx2PnPXqMb8LPuUs42X2bsjXX U+MxnKmFSnZDoQIbxyVoJOsWGtVtVOtqlr+RqbIawribuNv1yRdtJbMjcTFeqv6YOb lC4F/HZgK4xMANrGt94rL7hxtwdTHlcZCDrCae8o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Minjie Du , Viresh Kumar , Sergey Shtylyov , Damien Le Moal , Sasha Levin Subject: [PATCH 5.10 046/406] ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer() Date: Sun, 17 Sep 2023 21:08:20 +0200 Message-ID: <20230917191102.362847945@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191101.035638219@linuxfoundation.org> References: <20230917191101.035638219@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Minjie Du [ Upstream commit 4139f992c49356391fb086c0c8ce51f66c26d623 ] It is possible for dma_request_chan() to return EPROBE_DEFER, which means acdev->host->dev is not ready yet. At this point dev_err() will have no output. Use dev_err_probe() instead. Signed-off-by: Minjie Du Acked-by: Viresh Kumar Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal Signed-off-by: Sasha Levin --- drivers/ata/pata_arasan_cf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 63f39440a9b42..4ba02f082f962 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c @@ -528,7 +528,8 @@ static void data_xfer(struct work_struct *work) /* dma_request_channel may sleep, so calling from process context */ acdev->dma_chan = dma_request_chan(acdev->host->dev, "data"); if (IS_ERR(acdev->dma_chan)) { - dev_err(acdev->host->dev, "Unable to get dma_chan\n"); + dev_err_probe(acdev->host->dev, PTR_ERR(acdev->dma_chan), + "Unable to get dma_chan\n"); acdev->dma_chan = NULL; goto chan_request_fail; } -- 2.40.1