diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 7e55647f118e..410859ee112f 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
| @@ -487,8 +487,10 @@ int radeon_atombios_init(struct radeon_device *rdev) | |||
| 487 | 487 | ||
| 488 | void radeon_atombios_fini(struct radeon_device *rdev) | 488 | void radeon_atombios_fini(struct radeon_device *rdev) |
| 489 | { | 489 | { |
| 490 | kfree(rdev->mode_info.atom_context->scratch); | 490 | if (rdev->mode_info.atom_context) { |
| 491 | kfree(rdev->mode_info.atom_context); | 491 | kfree(rdev->mode_info.atom_context->scratch); |
| 492 | kfree(rdev->mode_info.atom_context); | ||
| 493 | } | ||
| 492 | kfree(rdev->mode_info.atom_card_info); | 494 | kfree(rdev->mode_info.atom_card_info); |
| 493 | } | 495 | } |
| 494 | 496 | ||
