PCI/hotplug: ppc: correct a php_slot usage after free
authorSimon Guo <wei.guo.simon@gmail.com>
Wed, 7 Mar 2018 08:46:04 +0000 (16:46 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 13 Mar 2018 04:50:32 +0000 (15:50 +1100)
commit97c6f25d5828b497e3e802b1f7c70187c88df623
tree45f54aeb912c410b93419955aeaa18e97da89517
parent5ee573e8ef034e687c420cb10911371488d14b10
PCI/hotplug: ppc: correct a php_slot usage after free

In pnv_php_unregister_one(), pnv_php_put_slot() might kfree
php_slot structure. But there is pci_hp_deregister() after
that with php_slot reference.

This patch moves pnv_php_put_slot() to the end of function.

Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/pci/hotplug/pnv_php.c