]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
skd: remove unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Sep 2013 08:06:11 +0000 (11:06 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Sep 2013 17:00:00 +0000 (11:00 -0600)
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@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/skd_main.c

index f892d95dd884847e8fab35d3e212922f9de1577e..467ae1a3966128e6631f5ff864226c30b79b7e64 100644 (file)
@@ -2911,7 +2911,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);