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: <1268401858-9213-1-git-send-email-ext-jani.1.nikula@nokia.com>
Date:	Fri, 12 Mar 2010 15:50:58 +0200
From:	Jani Nikula <ext-jani.1.nikula@...ia.com>
To:	linux-kernel@...r.kernel.org, James.Bottomley@...e.de
Cc:	akpm@...ux-foundation.org, ext-jani.1.nikula@...ia.com
Subject: [PATCH] enclosure: fix error path - actually return ERR_PTR() on error

Signed-off-by: Jani Nikula <ext-jani.1.nikula@...ia.com>

---

NOTE: I'm afraid I'm unable to test this; please consider this more a
bug report than a complete patch.
---
 drivers/misc/enclosure.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 1eac626..2979927 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -285,7 +285,7 @@ enclosure_component_register(struct enclosure_device *edev,
 
 	err = device_register(cdev);
 	if (err)
-		ERR_PTR(err);
+		return ERR_PTR(err);
 
 	return ecomp;
 }
-- 
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ