PCI: hv: Remove unnecessary type casting from kzalloc
authorDexuan Cui <decui@microsoft.com>
Sat, 22 Feb 2020 05:59:56 +0000 (21:59 -0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 24 Feb 2020 11:58:28 +0000 (11:58 +0000)
In C, there is no need to cast a void * to any other pointer type,
remove an unnecessary cast.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
drivers/pci/controller/pci-hyperv.c

index 9977abf..0fe0283 100644 (file)
@@ -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;