From patchwork Thu Feb 8 18:49:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13550329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30876C4828F for ; Thu, 8 Feb 2024 18:49:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2EF356B0093; Thu, 8 Feb 2024 13:49:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 252086B0095; Thu, 8 Feb 2024 13:49:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0CC836B0096; Thu, 8 Feb 2024 13:49:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E4A1B6B0093 for ; Thu, 8 Feb 2024 13:49:29 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B75F0140F48 for ; Thu, 8 Feb 2024 18:49:29 +0000 (UTC) X-FDA: 81769524858.25.72CBB96 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf28.hostedemail.com (Postfix) with ESMTP id 2A756C0007 for ; Thu, 8 Feb 2024 18:49:27 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b="bRoE/7ia"; spf=pass (imf28.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707418168; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=86cxj+xCR2VKZSzMElfFRPicz5DfDFyVUExhe2tu2h0=; b=Tf4S/NOQ/ToYFDxTTub65egKkvNj8qsskiXL/ta2bmM8oo7/82rBTXf8n2jo+lAnUoRIYa cTpvyUAF4y4QR/sgtGM+LrLfuabT9NOiZESzKPZg/bX/F0IJC18LT2OOVXRXJJUL7ThgjF YKqB5RmD9AJsQ2QkyvCz94sqPXWXgnQ= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b="bRoE/7ia"; spf=pass (imf28.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707418168; a=rsa-sha256; cv=none; b=FYGrkj+qKMMZNY0+NXMNEhNSCaBJFNKnV6sbwhQMbV7s5HP+7TiJiTjiMkF02fUKs4c18A bk7rba7eo2ln/WSAPbhroBULR9+B8pciYsjCQrdiegS4tDqUJp4yup1JqpSAWGPZwS7JP0 iy40Ff7KA6qghfh4ZlwqbzPSeFj2OLE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1707418167; bh=oenQ3E1qB1jTPZO/gOZI9CMarWIZCEOT7s/3o23TNGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bRoE/7ia1+B9bPI5yF1PR2T1XA93zIRBnTcH0eC3l0F5DKqYSeR5Nk0tY93pHHcMe SB173/Unk3i9YjDHq2INIyynyUJBpjhZxr/0L5wI/UAMDPahLp/TVB7Y5vIH5N5AE5 crMulQ2zXJos7wtuG6cN1nQG0cu1edkRYscl6pnAbz3KIhoZ8H50j2WoCr0/ks/Omt UUlXIcysLpTzkhjiT5Iptlazn5vqIFc3f+yfGuUzmScLfFjYAiJ1vOAPY4DDm2eyWC 3cTHV3qAZzEPVR6WjB/op0ynHNQPoZFIweA7jAiVScoeq13l0Lfy00tVuzsdsZm7a2 9S+WBZwfWHPmQ== Received: from thinkos.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TW5cl1F3pzY5T; Thu, 8 Feb 2024 13:49:27 -0500 (EST) From: Mathieu Desnoyers To: Dan Williams , Arnd Bergmann , Dave Chinner Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Andrew Morton , Linus Torvalds , Vishal Verma , Dave Jiang , Matthew Wilcox , Russell King , linux-arch@vger.kernel.org, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, dm-devel@lists.linux.dev, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Mikulas Patocka Subject: [PATCH v4 11/12] dcssblk: Cleanup alloc_dax() error handling Date: Thu, 8 Feb 2024 13:49:12 -0500 Message-Id: <20240208184913.484340-12-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> References: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2A756C0007 X-Rspam-User: X-Stat-Signature: cayhhpzxyaxqej9dnmcwowqonr1st1k7 X-Rspamd-Server: rspam01 X-HE-Tag: 1707418167-469744 X-HE-Meta: U2FsdGVkX1+zgXGNgFQj6TR9Fnksv7C7Y/F6RZgiYwuH1z7kMl8oYhcIo/CcNbujSahdUZfBR0l2n7E7wrFGjO18YBswTyZVhM8o+qDZHFXIj1QNxIZ1DWoV1/pJjPExMSqDROZs+SE+kR4vQJcSkvU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pBoZA4FjI9JTZZ9fQWBFztiuMugpVZj8zKnwSRvne5pyutI5fDX5d6Mydg+1jgcNjVxx13R3wRrdsz92GOy/2seeDV4Z9O1Ane9OSYjZShqIx2epygbRt8OL76L1KYkiOsC60cP41/zw1glg+dH+4ucUfTNv+REkW0/xbanj/KT8kL93VUpwoNt+y2oHbq4vSgOBoVjfQ+HNwxqY+PDdB5dW6twcF0L1eUfAr14rd6LZeigZ+55q8F9rw788o+sKoMl7qrtlk93mRw1sAGZen9mM0UXrDTII06RVc31NY0yJeGxTp0YO1U6tIbZuW6WvxbUQgqzDfpZ+ZDfHQchTpVoNCNBijFTQWHcGQeQQ/NWkFNhwpkFOxDj5GSMFP1apSRIyD/vFtvF2LfPEGRXm9uiEOGUJDErXH7Y3gjw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Now that alloc_dax() returns ERR_PTR(-EOPNOTSUPP) rather than NULL, the callers do not have to handle NULL return values anymore. Signed-off-by: Mathieu Desnoyers Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Cc: Andrew Morton Cc: Linus Torvalds Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Matthew Wilcox Cc: Arnd Bergmann Cc: Russell King Cc: linux-arch@vger.kernel.org Cc: linux-cxl@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: dm-devel@lists.linux.dev Cc: nvdimm@lists.linux.dev Cc: linux-s390@vger.kernel.org --- drivers/s390/block/dcssblk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index a3010849bfed..f363c1d51d9a 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -679,8 +679,8 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char goto put_dev; dax_dev = alloc_dax(dev_info, &dcssblk_dax_ops); - if (IS_ERR_OR_NULL(dax_dev)) { - rc = IS_ERR(dax_dev) ? PTR_ERR(dax_dev) : -EOPNOTSUPP; + if (IS_ERR(dax_dev)) { + rc = PTR_ERR(dax_dev); goto put_dev; } set_dax_synchronous(dax_dev);