File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -2097,6 +2097,11 @@ static int try_smi_init(struct smi_info *new_smi)
2097
2097
WARN_ON (new_smi -> io .dev -> init_name != NULL );
2098
2098
2099
2099
out_err :
2100
+ if (rv && new_smi -> io .io_cleanup ) {
2101
+ new_smi -> io .io_cleanup (& new_smi -> io );
2102
+ new_smi -> io .io_cleanup = NULL ;
2103
+ }
2104
+
2100
2105
kfree (init_name );
2101
2106
return rv ;
2102
2107
}
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