Merge tag 'pinctrl-v4.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-2.6-block.git] / arch / x86 / kernel / cpu / mcheck / mce_amd.c
index ffacfdcacb85eafd145228d0e0d3e4765b2177ea..a5fd137417a27278f49f3cf0b60803997176a665 100644 (file)
@@ -1182,6 +1182,9 @@ static int threshold_create_bank(unsigned int cpu, unsigned int bank)
        const char *name = get_name(bank, NULL);
        int err = 0;
 
+       if (!dev)
+               return -ENODEV;
+
        if (is_shared_bank(bank)) {
                nb = node_to_amd_nb(amd_get_nb_id(cpu));