Commit 0b6212e0 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux

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
...@@ -636,7 +636,7 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par, ...@@ -636,7 +636,7 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,
err = broadsheet_spiflash_read_range(par, start_sector_addr, err = broadsheet_spiflash_read_range(par, start_sector_addr,
data_start_addr, sector_buffer); data_start_addr, sector_buffer);
if (err) if (err)
return err; goto out;
} }
/* now we copy our data into the right place in the sector buffer */ /* 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, ...@@ -657,7 +657,7 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,
err = broadsheet_spiflash_read_range(par, tail_start_addr, err = broadsheet_spiflash_read_range(par, tail_start_addr,
tail_len, sector_buffer + tail_start_addr); tail_len, sector_buffer + tail_start_addr);
if (err) if (err)
return err; goto out;
} }
/* if we got here we have the full sector that we want to rewrite. */ /* 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, ...@@ -665,11 +665,13 @@ static int broadsheet_spiflash_rewrite_sector(struct broadsheetfb_par *par,
/* first erase the sector */ /* first erase the sector */
err = broadsheet_spiflash_erase_sector(par, start_sector_addr); err = broadsheet_spiflash_erase_sector(par, start_sector_addr);
if (err) if (err)
return err; goto out;
/* now write it */ /* now write it */
err = broadsheet_spiflash_write_sector(par, start_sector_addr, err = broadsheet_spiflash_write_sector(par, start_sector_addr,
sector_buffer, sector_size); sector_buffer, sector_size);
out:
kfree(sector_buffer);
return err; return err;
} }
......
...@@ -402,7 +402,7 @@ static int __init simplefb_init(void) ...@@ -402,7 +402,7 @@ static int __init simplefb_init(void)
if (ret) if (ret)
return 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) { for_each_child_of_node(of_chosen, np) {
if (of_device_is_compatible(np, "simple-framebuffer")) if (of_device_is_compatible(np, "simple-framebuffer"))
of_platform_device_create(np, NULL, NULL); of_platform_device_create(np, NULL, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment