Skip to content

Commit

Permalink
PCI: hv: Remove unnecessary type casting from kzalloc
Browse files Browse the repository at this point in the history
In C, there is no need to cast a void * to any other pointer type,
remove an unnecessary cast.

Signed-off-by: Dexuan Cui <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Reviewed-by: Michael Kelley <[email protected]>
  • Loading branch information
dcui authored and Lorenzo Pieralisi committed Feb 24, 2020
1 parent bb6d3fb commit e658a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/controller/pci-hyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2922,7 +2922,7 @@ static int hv_pci_probe(struct hv_device *hdev,
* positive by using kmemleak_alloc() and kmemleak_free() to ask
* kmemleak to track and scan the hbus buffer.
*/
hbus = (struct hv_pcibus_device *)kzalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
hbus = kzalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
if (!hbus)
return -ENOMEM;
hbus->state = hv_pcibus_init;
Expand Down

0 comments on commit e658a4f

Please sign in to comment.