lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220917062606.1701-1-williamsukatube@163.com>
Date:   Sat, 17 Sep 2022 14:26:06 +0800
From:   williamsukatube@....com
To:     nvdimm@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc:     dan.j.williams@...el.com, vishal.l.verma@...el.com,
        dave.jiang@...el.com, William Dean <williamsukatube@....com>
Subject: [PATH -next] device-dax: simplify code in devm_register_dax_mapping

From: William Dean <williamsukatube@....com>

It could directly return 'devm_add_action_or_reset' to simplify code.

Signed-off-by: William Dean <williamsukatube@....com>
---
 drivers/dax/bus.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index 1dad813ee4a6..251c53061764 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -772,11 +772,8 @@ static int devm_register_dax_mapping(struct dev_dax *dev_dax, int range_id)
 		return rc;
 	}
 
-	rc = devm_add_action_or_reset(dax_region->dev, unregister_dax_mapping,
+	return devm_add_action_or_reset(dax_region->dev, unregister_dax_mapping,
 			dev);
-	if (rc)
-		return rc;
-	return 0;
 }
 
 static int alloc_dev_dax_range(struct dev_dax *dev_dax, u64 start,
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ