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: <20130913080610.GH19211@elgon.mountain>
Date:	Fri, 13 Sep 2013 11:06:11 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	Jeff Moyer <jmoyer@...hat.com>,
	Ramprasad Chinthekindi <rchinthekindi@...c-inc.com>,
	Akhil Bhansali <abhansali@...c-inc.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch 4/4] skd: remove unneeded NULL check

We already dereferenced "skdev" a few lines earlier in the debug code so
my static checker complains.  I audited the callers and "skdev" is never
NULL here so I have removed the check.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 20ad843..827f927 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -2909,7 +2909,7 @@ static void skd_do_inq_page_da(struct skd_device *skdev,
 
 	inq.page_code = DRIVER_INQ_EVPD_PAGE_CODE;
 
-	if (skdev && skdev->pdev && skdev->pdev->bus) {
+	if (skdev->pdev && skdev->pdev->bus) {
 		skd_get_link_info(skdev->pdev,
 				  &inq.pcie_link_speed, &inq.pcie_link_lanes);
 		inq.pcie_bus_number = cpu_to_be16(skdev->pdev->bus->number);
--
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