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

Commit 0b6212e0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull fbdev fixes from Tomi Valkeinen:
 - broadsheetfb: fix memory leak
 - simplefb: fix build failure on sparc

* tag 'fbdev-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  fbdev/broadsheetfb: fix memory leak
  simplefb: Fix build failure on Sparc
parents 7b552bc1 ef6899cd
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -636,7 +636,7 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,
		err = broadsheet_spiflash_read_range(par, start_sector_addr,
						data_start_addr, sector_buffer);
		if (err)
			return err;
			goto out;
	}

	/* now we copy our data into the right place in the sector buffer */
@@ -657,7 +657,7 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,
		err = broadsheet_spiflash_read_range(par, tail_start_addr,
			tail_len, sector_buffer + tail_start_addr);
		if (err)
			return err;
			goto out;
	}

	/* if we got here we have the full sector that we want to rewrite. */
@@ -665,11 +665,13 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,
	/* first erase the sector */
	err = broadsheet_spiflash_erase_sector(par, start_sector_addr);
	if (err)
		return err;
		goto out;

	/* now write it */
	err = broadsheet_spiflash_write_sector(par, start_sector_addr,
					sector_buffer, sector_size);
out:
	kfree(sector_buffer);
	return err;
}

+1 −1
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ static int __init simplefb_init(void)
	if (ret)
		return ret;

	if (IS_ENABLED(CONFIG_OF) && of_chosen) {
	if (IS_ENABLED(CONFIG_OF_ADDRESS) && of_chosen) {
		for_each_child_of_node(of_chosen, np) {
			if (of_device_is_compatible(np, "simple-framebuffer"))
				of_platform_device_create(np, NULL, NULL);