[PATCH 2/2] hpsa: remove a needless call - pci_get_drvdata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tomas Henzl <thenzl@xxxxxxxxxx>
---
 drivers/scsi/hpsa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 909562c09f..7fdc4d2a91 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -7069,13 +7069,12 @@ static void hpsa_free_device_info(struct ctlr_info *h)
 
 static void hpsa_remove_one(struct pci_dev *pdev)
 {
-	struct ctlr_info *h;
+	struct ctlr_info *h = pci_get_drvdata(pdev);
 
-	if (pci_get_drvdata(pdev) == NULL) {
+	if (!h) {
 		dev_err(&pdev->dev, "unable to remove device\n");
 		return;
 	}
-	h = pci_get_drvdata(pdev);
 
 	/* Get rid of any controller monitoring work items */
 	h->remove_in_progress = 1;
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux