File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
132
132
info -> fix .smem_start = 0 ;
133
133
info -> fix .smem_len = size ;
134
134
135
+ bochs -> fb .initialized = true;
135
136
return 0 ;
136
137
}
137
138
@@ -148,7 +149,6 @@ static int bochs_fbdev_destroy(struct bochs_device *bochs)
148
149
gfb -> obj = NULL ;
149
150
}
150
151
151
- drm_fb_helper_fini (& bochs -> fb .helper );
152
152
drm_framebuffer_unregister_private (& gfb -> base );
153
153
drm_framebuffer_cleanup (& gfb -> base );
154
154
@@ -180,7 +180,6 @@ int bochs_fbdev_init(struct bochs_device *bochs)
180
180
if (ret )
181
181
goto fini ;
182
182
183
- bochs -> fb .initialized = true;
184
183
return 0 ;
185
184
186
185
fini :
@@ -190,9 +189,9 @@ int bochs_fbdev_init(struct bochs_device *bochs)
190
189
191
190
void bochs_fbdev_fini (struct bochs_device * bochs )
192
191
{
193
- if (! bochs -> fb .initialized )
194
- return ;
192
+ if (bochs -> fb .initialized )
193
+ bochs_fbdev_destroy ( bochs ) ;
195
194
196
- bochs_fbdev_destroy ( bochs );
195
+ drm_fb_helper_fini ( & bochs -> fb . helper );
197
196
bochs -> fb .initialized = false;
198
197
}
You can’t perform that action at this time.
0 commit comments