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]
Date:	Fri, 02 May 2008 10:37:06 +0200
From:	<oliver@...ernowsky.hu>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Zhao Yakui <yakui.zhao@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Len Brown <len.brown@...el.com>, linux-kernel@...r.kernel.org
Subject: [OP] ACPI-check-a-return-value-correctly-in-acpi_power_get_context.patch
 added to queue-2.6.22.23-op1

Your patch added to queue-2.6.22.23-op1.
If anyone has any objections, please let us know.

---

>From a815ab8b5891f3d2515316655729272f68269e3b Mon Sep 17 00:00:00 2001
From: Li Zefan <lizf@...fujitsu.com>
Date: Fri, 18 Apr 2008 13:27:29 -0700
Subject: [PATCH] ACPI: check a return value correctly in
acpi_power_get_context()

We should check *resource != NULL rather than resource != NULL, which will
be
always true.

Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Acked-by: Zhao Yakui <yakui.zhao@...el.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Len Brown <len.brown@...el.com>

diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 76bf6d9..f2a76ac 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -121,7 +121,7 @@ acpi_power_get_context(acpi_handle handle,
 	}
 
 	*resource = acpi_driver_data(device);
-	if (!resource)
+	if (!*resource)
 		return -ENODEV;
 
 	return 0;


--
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