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

Commit 177c0386 authored by Markus Elfring's avatar Markus Elfring Committed by Tomi Valkeinen
Browse files

video: udlfb: Deletion of unnecessary checks before the function call "vfree"



The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent e87d9f29
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -922,7 +922,6 @@ static void dlfb_free(struct kref *kref)
{
	struct dlfb_data *dev = container_of(kref, struct dlfb_data, kref);

	if (dev->backing_buffer)
	vfree(dev->backing_buffer);

	kfree(dev->edid);
@@ -953,7 +952,6 @@ static void dlfb_free_framebuffer(struct dlfb_data *dev)
			fb_dealloc_cmap(&info->cmap);
		if (info->monspecs.modedb)
			fb_destroy_modedb(info->monspecs.modedb);
		if (info->screen_base)
		vfree(info->screen_base);

		fb_destroy_modelist(&info->modelist);
@@ -1203,7 +1201,6 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dev, struct fb_info *info)
		if (!new_back)
			pr_info("No shadow/backing buffer allocated\n");
		else {
			if (dev->backing_buffer)
			vfree(dev->backing_buffer);
			dev->backing_buffer = new_back;
		}