mirror of
https://github.com/openbsd/src.git
synced 2026-06-19 15:53:31 +02:00
drm/client: Do not destroy NULL modes
From Jonathan Cavitt 4e3ca5f82346cc23c0a71f1ceb006115ff6b0745 in linux-6.18.y/6.18.17 c601fd5414315fc515f746b499110e46272e7243 in mainline linux
This commit is contained in:
@@ -940,7 +940,8 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
|
||||
mutex_unlock(&client->modeset_mutex);
|
||||
out:
|
||||
kfree(crtcs);
|
||||
modes_destroy(dev, modes, connector_count);
|
||||
if (modes)
|
||||
modes_destroy(dev, modes, connector_count);
|
||||
kfree(modes);
|
||||
kfree(offsets);
|
||||
kfree(enabled);
|
||||
|
||||
Reference in New Issue
Block a user