|
@@ -487,8 +487,10 @@ int radeon_atombios_init(struct radeon_device *rdev)
|
|
|
|
|
|
void radeon_atombios_fini(struct radeon_device *rdev)
|
|
|
{
|
|
|
- kfree(rdev->mode_info.atom_context->scratch);
|
|
|
- kfree(rdev->mode_info.atom_context);
|
|
|
+ if (rdev->mode_info.atom_context) {
|
|
|
+ kfree(rdev->mode_info.atom_context->scratch);
|
|
|
+ kfree(rdev->mode_info.atom_context);
|
|
|
+ }
|
|
|
kfree(rdev->mode_info.atom_card_info);
|
|
|
}
|
|
|
|