···237237238238 /* get the /sys/devices/system/edac reference */239239 edac_subsys = edac_get_sysfs_subsys();240240- if (edac_subsys == NULL) {241241- edac_dbg(1, "no edac_subsys error\n");242242- err = -ENODEV;243243- goto err_out;244244- }245240246241 /* Point to the 'edac_subsys' this instance 'reports' to */247242 edac_dev->edac_subsys = edac_subsys;
+1-10
drivers/edac/edac_mc_sysfs.c
···10251025 */10261026int __init edac_mc_sysfs_init(void)10271027{10281028- struct bus_type *edac_subsys;10291028 int err;10301030-10311031- /* get the /sys/devices/system/edac subsys reference */10321032- edac_subsys = edac_get_sysfs_subsys();10331033- if (edac_subsys == NULL) {10341034- edac_dbg(1, "no edac_subsys\n");10351035- err = -EINVAL;10361036- goto out;10371037- }1038102910391030 mci_pdev = kzalloc(sizeof(*mci_pdev), GFP_KERNEL);10401031 if (!mci_pdev) {···10331042 goto out;10341043 }1035104410361036- mci_pdev->bus = edac_subsys;10451045+ mci_pdev->bus = edac_get_sysfs_subsys();10371046 mci_pdev->type = &mc_attr_type;10381047 device_initialize(mci_pdev);10391048 dev_set_name(mci_pdev, "mc");
+1-9
drivers/edac/edac_pci_sysfs.c
···331331};332332333333/**334334- * edac_pci_main_kobj_setup()335335- *336336- * setup the sysfs for EDAC PCI attributes337337- * assumes edac_subsys has already been initialized334334+ * edac_pci_main_kobj_setup: Setup the sysfs for EDAC PCI attributes.338335 */339336static int edac_pci_main_kobj_setup(void)340337{···348351 * controls and attributes349352 */350353 edac_subsys = edac_get_sysfs_subsys();351351- if (edac_subsys == NULL) {352352- edac_dbg(1, "no edac_subsys\n");353353- err = -ENODEV;354354- goto decrement_count_fail;355355- }356354357355 /* Bump the reference count on this module to ensure the358356 * modules isn't unloaded until we deconstruct the top