Skip to contentSkip to conversation

lpfc: Remove unnessary cast

PATCH New Firo Yang 1 participant 1 message Apr 23, 2015

Subsystems (3)
lore
Share & tools
lore

Firo Yang

author
#0 lore raw

PATCH 1/1 lpfc: Remove unnessary cast

kzalloc() returns a void pointer - no need to cast it in drivers/scsi/lpfc/lpfc_init.c::lpfc_sli_driver_resource_setup()

---
 drivers/scsi/lpfc/lpfc_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_init.c +1 -2
index e8c8c1e..30b72da 100644
@@ -4975,8 +4975,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)
 	}
 
 	if (!phba->sli.ring)
-		phba->sli.ring = (struct lpfc_sli_ring *)
-			kzalloc(LPFC_SLI3_MAX_RING *
+		phba->sli.ring = kzalloc(LPFC_SLI3_MAX_RING *
 			sizeof(struct lpfc_sli_ring), GFP_KERNEL);
 	if (!phba->sli.ring)
 		return -ENOMEM;
Signature · 1 line
2.1.0