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=1266963170f576d4d08e6310b6963e26d3ff9d1e;hpb=78d425677217b655ed36c492a070b5002832fc73 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);