X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=blobdiff_plain;f=drivers%2Fpci%2Fpci-sysfs.c;h=92618686604cb9d314aa1e6bf833363cfbaaa1b5;hp=312f23a8429cd9331b45afaf72a278e84bd41d83;hb=d63a9788650fcd999b34584316afee6bd4378f19;hpb=d6a4c0e5d3d433ef296f8f417e835329a834a256 diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 312f23a8429c..92618686604c 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -216,7 +216,7 @@ static ssize_t numa_node_store(struct device *dev, if (ret) return ret; - if (!node_online(node)) + if (node >= MAX_NUMNODES || !node_online(node)) return -EINVAL; add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);