File tree 3 files changed +11
-4
lines changed
3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -2085,6 +2085,11 @@ static int try_smi_init(struct smi_info *new_smi)
2085
2085
WARN_ON (new_smi -> io .dev -> init_name != NULL );
2086
2086
2087
2087
out_err :
2088
+ if (rv && new_smi -> io .io_cleanup ) {
2089
+ new_smi -> io .io_cleanup (& new_smi -> io );
2090
+ new_smi -> io .io_cleanup = NULL ;
2091
+ }
2092
+
2088
2093
kfree (init_name );
2089
2094
return rv ;
2090
2095
}
Original file line number Diff line number Diff line change @@ -81,8 +81,6 @@ int ipmi_si_mem_setup(struct si_sm_io *io)
81
81
if (!addr )
82
82
return - ENODEV ;
83
83
84
- io -> io_cleanup = mem_cleanup ;
85
-
86
84
/*
87
85
* Figure out the actual readb/readw/readl/etc routine to use based
88
86
* upon the register size.
@@ -141,5 +139,8 @@ int ipmi_si_mem_setup(struct si_sm_io *io)
141
139
mem_region_cleanup (io , io -> io_size );
142
140
return - EIO ;
143
141
}
142
+
143
+ io -> io_cleanup = mem_cleanup ;
144
+
144
145
return 0 ;
145
146
}
Original file line number Diff line number Diff line change @@ -68,8 +68,6 @@ int ipmi_si_port_setup(struct si_sm_io *io)
68
68
if (!addr )
69
69
return - ENODEV ;
70
70
71
- io -> io_cleanup = port_cleanup ;
72
-
73
71
/*
74
72
* Figure out the actual inb/inw/inl/etc routine to use based
75
73
* upon the register size.
@@ -109,5 +107,8 @@ int ipmi_si_port_setup(struct si_sm_io *io)
109
107
return - EIO ;
110
108
}
111
109
}
110
+
111
+ io -> io_cleanup = port_cleanup ;
112
+
112
113
return 0 ;
113
114
}
You can’t perform that action at this time.
0 commit comments