Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 090da752 authored by Wang YanQing's avatar Wang YanQing Committed by Tomi Valkeinen
Browse files

video:uvesafb: Fix dereference NULL pointer code path



platform_device_alloc could failed and return NULL,
we should check this before call platform_device_put.

Signed-off-by: default avatarWang YanQing <udknight@gmail.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 477fc03f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1973,6 +1973,7 @@ static int uvesafb_init(void)
			err = -ENOMEM;

		if (err) {
			if (uvesafb_device)
				platform_device_put(uvesafb_device);
			platform_driver_unregister(&uvesafb_driver);
			cn_del_callback(&uvesafb_cn_id);