File tree Expand file tree Collapse file tree 7 files changed +9
-26
lines changed Expand file tree Collapse file tree 7 files changed +9
-26
lines changed Original file line number Diff line number Diff line change @@ -117,24 +117,22 @@ int dm_register_path_selector(struct path_selector_type *pst)
117
117
}
118
118
EXPORT_SYMBOL_GPL (dm_register_path_selector );
119
119
120
- int dm_unregister_path_selector (struct path_selector_type * pst )
120
+ void dm_unregister_path_selector (struct path_selector_type * pst )
121
121
{
122
122
struct ps_internal * psi ;
123
123
124
124
down_write (& _ps_lock );
125
125
126
126
psi = __find_path_selector_type (pst -> name );
127
- if (!psi ) {
127
+ if (WARN_ON ( !psi ) ) {
128
128
up_write (& _ps_lock );
129
- return - EINVAL ;
129
+ return ;
130
130
}
131
131
132
132
list_del (& psi -> list );
133
133
134
134
up_write (& _ps_lock );
135
135
136
136
kfree (psi );
137
-
138
- return 0 ;
139
137
}
140
138
EXPORT_SYMBOL_GPL (dm_unregister_path_selector );
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ struct path_selector_type {
96
96
int dm_register_path_selector (struct path_selector_type * type );
97
97
98
98
/* Unregister a path selector */
99
- int dm_unregister_path_selector (struct path_selector_type * type );
99
+ void dm_unregister_path_selector (struct path_selector_type * type );
100
100
101
101
/* Returns a registered path selector type */
102
102
struct path_selector_type * dm_get_path_selector (const char * name );
Original file line number Diff line number Diff line change @@ -551,10 +551,7 @@ static int __init dm_hst_init(void)
551
551
552
552
static void __exit dm_hst_exit (void )
553
553
{
554
- int r = dm_unregister_path_selector (& hst_ps );
555
-
556
- if (r < 0 )
557
- DMERR ("unregister failed %d" , r );
554
+ dm_unregister_path_selector (& hst_ps );
558
555
}
559
556
560
557
module_init (dm_hst_init );
Original file line number Diff line number Diff line change @@ -260,10 +260,7 @@ static int __init dm_ioa_init(void)
260
260
261
261
static void __exit dm_ioa_exit (void )
262
262
{
263
- int ret = dm_unregister_path_selector (& ioa_ps );
264
-
265
- if (ret < 0 )
266
- DMERR ("unregister failed %d" , ret );
263
+ dm_unregister_path_selector (& ioa_ps );
267
264
}
268
265
269
266
module_init (dm_ioa_init );
Original file line number Diff line number Diff line change @@ -270,10 +270,7 @@ static int __init dm_ql_init(void)
270
270
271
271
static void __exit dm_ql_exit (void )
272
272
{
273
- int r = dm_unregister_path_selector (& ql_ps );
274
-
275
- if (r < 0 )
276
- DMERR ("unregister failed %d" , r );
273
+ dm_unregister_path_selector (& ql_ps );
277
274
}
278
275
279
276
module_init (dm_ql_init );
Original file line number Diff line number Diff line change @@ -230,10 +230,7 @@ static int __init dm_rr_init(void)
230
230
231
231
static void __exit dm_rr_exit (void )
232
232
{
233
- int r = dm_unregister_path_selector (& rr_ps );
234
-
235
- if (r < 0 )
236
- DMERR ("unregister failed %d" , r );
233
+ dm_unregister_path_selector (& rr_ps );
237
234
}
238
235
239
236
module_init (dm_rr_init );
Original file line number Diff line number Diff line change @@ -351,10 +351,7 @@ static int __init dm_st_init(void)
351
351
352
352
static void __exit dm_st_exit (void )
353
353
{
354
- int r = dm_unregister_path_selector (& st_ps );
355
-
356
- if (r < 0 )
357
- DMERR ("unregister failed %d" , r );
354
+ dm_unregister_path_selector (& st_ps );
358
355
}
359
356
360
357
module_init (dm_st_init );
You can’t perform that action at this time.
0 commit comments