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 @@ -2085,6 +2085,11 @@ static int try_smi_init(struct smi_info *new_smi)
20852085 WARN_ON (new_smi -> io .dev -> init_name != NULL );
20862086
20872087 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+
20882093 kfree (init_name );
20892094 return rv ;
20902095}
Original file line number Diff line number Diff line change @@ -81,8 +81,6 @@ int ipmi_si_mem_setup(struct si_sm_io *io)
8181 if (!addr )
8282 return - ENODEV ;
8383
84- io -> io_cleanup = mem_cleanup ;
85-
8684 /*
8785 * Figure out the actual readb/readw/readl/etc routine to use based
8886 * upon the register size.
@@ -141,5 +139,8 @@ int ipmi_si_mem_setup(struct si_sm_io *io)
141139 mem_region_cleanup (io , io -> io_size );
142140 return - EIO ;
143141 }
142+
143+ io -> io_cleanup = mem_cleanup ;
144+
144145 return 0 ;
145146}
Original file line number Diff line number Diff line change @@ -68,8 +68,6 @@ int ipmi_si_port_setup(struct si_sm_io *io)
6868 if (!addr )
6969 return - ENODEV ;
7070
71- io -> io_cleanup = port_cleanup ;
72-
7371 /*
7472 * Figure out the actual inb/inw/inl/etc routine to use based
7573 * upon the register size.
@@ -109,5 +107,8 @@ int ipmi_si_port_setup(struct si_sm_io *io)
109107 return - EIO ;
110108 }
111109 }
110+
111+ io -> io_cleanup = port_cleanup ;
112+
112113 return 0 ;
113114}
You can’t perform that action at this time.
0 commit comments