File tree Expand file tree Collapse file tree 3 files changed +2
-24
lines changed Expand file tree Collapse file tree 3 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -237,11 +237,6 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)
237237
238238 /* get the /sys/devices/system/edac reference */
239239 edac_subsys = edac_get_sysfs_subsys ();
240- if (edac_subsys == NULL ) {
241- edac_dbg (1 , "no edac_subsys error\n" );
242- err = - ENODEV ;
243- goto err_out ;
244- }
245240
246241 /* Point to the 'edac_subsys' this instance 'reports' to */
247242 edac_dev -> edac_subsys = edac_subsys ;
Original file line number Diff line number Diff line change @@ -1025,24 +1025,15 @@ static struct device_type mc_attr_type = {
10251025 */
10261026int __init edac_mc_sysfs_init (void )
10271027{
1028- struct bus_type * edac_subsys ;
10291028 int err ;
10301029
1031- /* get the /sys/devices/system/edac subsys reference */
1032- edac_subsys = edac_get_sysfs_subsys ();
1033- if (edac_subsys == NULL ) {
1034- edac_dbg (1 , "no edac_subsys\n" );
1035- err = - EINVAL ;
1036- goto out ;
1037- }
1038-
10391030 mci_pdev = kzalloc (sizeof (* mci_pdev ), GFP_KERNEL );
10401031 if (!mci_pdev ) {
10411032 err = - ENOMEM ;
10421033 goto out ;
10431034 }
10441035
1045- mci_pdev -> bus = edac_subsys ;
1036+ mci_pdev -> bus = edac_get_sysfs_subsys () ;
10461037 mci_pdev -> type = & mc_attr_type ;
10471038 device_initialize (mci_pdev );
10481039 dev_set_name (mci_pdev , "mc" );
Original file line number Diff line number Diff line change @@ -331,10 +331,7 @@ static struct kobj_type ktype_edac_pci_main_kobj = {
331331};
332332
333333/**
334- * edac_pci_main_kobj_setup()
335- *
336- * setup the sysfs for EDAC PCI attributes
337- * assumes edac_subsys has already been initialized
334+ * edac_pci_main_kobj_setup: Setup the sysfs for EDAC PCI attributes.
338335 */
339336static int edac_pci_main_kobj_setup (void )
340337{
@@ -351,11 +348,6 @@ static int edac_pci_main_kobj_setup(void)
351348 * controls and attributes
352349 */
353350 edac_subsys = edac_get_sysfs_subsys ();
354- if (edac_subsys == NULL ) {
355- edac_dbg (1 , "no edac_subsys\n" );
356- err = - ENODEV ;
357- goto decrement_count_fail ;
358- }
359351
360352 /* Bump the reference count on this module to ensure the
361353 * modules isn't unloaded until we deconstruct the top
You can’t perform that action at this time.
0 commit comments