On Monday, June 06, 2016 05:25:33 PM Andy Shevchenko wrote: > When assign new PCI platform PM operations check for all mandatory fields to > prevent NULL pointer dereference. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> OK in principle, but what's the motivation? > --- > drivers/pci/pci.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index c8b4dbd..badbddc 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -530,8 +530,8 @@ static const struct pci_platform_pm_ops *pci_platform_pm; > > int pci_set_platform_pm(const struct pci_platform_pm_ops *ops) > { > - if (!ops->is_manageable || !ops->set_state || !ops->choose_state > - || !ops->sleep_wake) > + if (!ops->is_manageable || !ops->set_state || !ops->choose_state || > + !ops->sleep_wake || !ops->run_wake || !ops->need_resume) > return -EINVAL; > pci_platform_pm = ops; > return 0; > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html