From: Samuel Iglesias Gonsalvez Date: Fri, 25 May 2012 08:03:04 +0000 (+0200) Subject: Staging: ipack/bridges/tpci200: avoid dereference of a freed tpci200->info X-Git-Tag: firefly_0821_release~3680^2~2356^2~903 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ca2d2bb6618396ec0a79b182fcd1591ef62b07cb;p=firefly-linux-kernel-4.4.55.git Staging: ipack/bridges/tpci200: avoid dereference of a freed tpci200->info tpci200->info is used later when uninstalling the module. As there is another kfree in the proper place, this patch removes the wrong one. Signed-off-by: Samuel Iglesias Gonsalvez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 67516255480b..e04cb8ade9e7 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -290,8 +290,6 @@ static void tpci200_unregister(struct tpci200_board *tpci200) pci_disable_device(tpci200->info->pdev); pci_dev_put(tpci200->info->pdev); - kfree(tpci200->info); - for (i = 0; i < TPCI200_NB_SLOT; i++) { tpci200->slots[i].io_phys.address = NULL; tpci200->slots[i].io_phys.size = 0;