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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <567E693F.4040909@users.sourceforge.net>
Date:	Sat, 26 Dec 2015 11:17:35 +0100
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	linux-ide@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 2/3] IDE-ACPI: Delete unnecessary null pointer checks in
 ide_get_dev_handle()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 26 Dec 2015 10:33:48 +0100

The variable "dinfo" will contain an appropropriate pointer after a call
of the acpi_get_object_info() function succeeded.
Thus remove two safety checks.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/ide/ide-acpi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index 319b754..b6b2111 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -148,14 +148,14 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle,
 		DEBPRINT("get_object_info for device failed\n");
 		return -ENODEV;
 	}
-	if (dinfo && (dinfo->valid & ACPI_VALID_ADR) &&
+	if ((dinfo->valid & ACPI_VALID_ADR) &&
 	    dinfo->address == addr) {
 		*pcidevfn = addr;
 		*handle = dev_handle;
 	} else {
 		DEBPRINT("get_object_info for device has wrong "
 			" address: %llu, should be %u\n",
-			dinfo ? (unsigned long long)dinfo->address : -1ULL,
+			(unsigned long long)dinfo->address,
 			(unsigned int)addr);
 		ret = -ENODEV;
 		goto free_info;
-- 
2.6.3

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