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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <858b140b276ceab52a84ce0d4f924b0c411560d1.1689618373.git.christophe.jaillet@wanadoo.fr>
Date:   Mon, 17 Jul 2023 20:26:30 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Saravana Kannan <saravanak@...gle.com>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH] driver core: Fix an error handling path in fw_devlink_create_devlink()

All error handling paths go to 'out', except this one. Be consistent and
also branch to 'out' here.

Fixes: 74c782cff77b ("driver core: fw_devlink: Handle suppliers that don't use driver core")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
/!\ Speculative /!\

   This patch is based on analysis of the surrounding code and should be
   reviewed with care !

   If the patch is wrong, maybe a comment in the code could explain why.

/!\ Speculative /!\
---
 drivers/base/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 3dff5037943e..854c1fab742c 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2107,7 +2107,8 @@ static int fw_devlink_create_devlink(struct device *con,
 	    fwnode_ancestor_init_without_drv(sup_handle)) {
 		dev_dbg(con, "Not linking %pfwf - might never become dev\n",
 			sup_handle);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto out;
 	}
 
 	ret = -EAGAIN;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ