File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,24 +117,22 @@ int dm_register_path_selector(struct path_selector_type *pst)
117117}
118118EXPORT_SYMBOL_GPL (dm_register_path_selector );
119119
120- int dm_unregister_path_selector (struct path_selector_type * pst )
120+ void dm_unregister_path_selector (struct path_selector_type * pst )
121121{
122122 struct ps_internal * psi ;
123123
124124 down_write (& _ps_lock );
125125
126126 psi = __find_path_selector_type (pst -> name );
127- if (!psi ) {
127+ if (WARN_ON ( !psi ) ) {
128128 up_write (& _ps_lock );
129- return - EINVAL ;
129+ return ;
130130 }
131131
132132 list_del (& psi -> list );
133133
134134 up_write (& _ps_lock );
135135
136136 kfree (psi );
137-
138- return 0 ;
139137}
140138EXPORT_SYMBOL_GPL (dm_unregister_path_selector );
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ struct path_selector_type {
9696int dm_register_path_selector (struct path_selector_type * type );
9797
9898/* 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 );
100100
101101/* Returns a registered path selector type */
102102struct 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)
551551
552552static void __exit dm_hst_exit (void )
553553{
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 );
558555}
559556
560557module_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)
260260
261261static void __exit dm_ioa_exit (void )
262262{
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 );
267264}
268265
269266module_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)
270270
271271static void __exit dm_ql_exit (void )
272272{
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 );
277274}
278275
279276module_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)
230230
231231static void __exit dm_rr_exit (void )
232232{
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 );
237234}
238235
239236module_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)
351351
352352static void __exit dm_st_exit (void )
353353{
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 );
358355}
359356
360357module_init (dm_st_init );
You can’t perform that action at this time.
0 commit comments