File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -92,18 +92,15 @@ static int __init via_pmu_led_init(void)
92
92
if (dt == NULL )
93
93
return - ENODEV ;
94
94
model = of_get_property (dt , "model" , NULL );
95
- if (model == NULL ) {
96
- of_node_put (dt );
97
- return - ENODEV ;
98
- }
95
+ if (!model )
96
+ goto put_node ;
97
+
99
98
if (strncmp (model , "PowerBook" , strlen ("PowerBook" )) != 0 &&
100
99
strncmp (model , "iBook" , strlen ("iBook" )) != 0 &&
101
100
strcmp (model , "PowerMac7,2" ) != 0 &&
102
- strcmp (model , "PowerMac7,3" ) != 0 ) {
103
- of_node_put (dt );
104
- /* ignore */
105
- return - ENODEV ;
106
- }
101
+ strcmp (model , "PowerMac7,3" ) != 0 )
102
+ goto put_node ;
103
+
107
104
of_node_put (dt );
108
105
109
106
spin_lock_init (& pmu_blink_lock );
@@ -112,6 +109,10 @@ static int __init via_pmu_led_init(void)
112
109
pmu_blink_req .done = pmu_req_done ;
113
110
114
111
return led_classdev_register (NULL , & pmu_led );
112
+
113
+ put_node :
114
+ of_node_put (dt );
115
+ return - ENODEV ;
115
116
}
116
117
117
118
late_initcall (via_pmu_led_init );
You can’t perform that action at this time.
0 commit comments