Skip to contentSkip to conversation

fix type error in cx23885 and altera-stapl move out from staging

PATCH Applied Igor M. Liplianin 2 participants 2 messages Sep 23, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix type error in cx23885 and altera-stapl move out from staging

The following changes since commit 3a7a62378be538944ff00904b8e0b795fe16609a:

[media] ati_remote: update Kconfig description (2011-09-22 10:55:10 -0300)

are available in the git repository at:
http://linuxtv.org/git/liplianin/media_tree.git netup_patches

Igor M. Liplianin (2):
cx23885: fix type error
altera-stapl: it is time to move out from staging

 drivers/media/video/cx23885/Kconfig                |    2 +-
 drivers/media/video/cx23885/cx23885-cards.c        |    2 +-
 drivers/misc/Kconfig                               |    1 +
 drivers/misc/Makefile                              |    1 +
 drivers/{staging => misc}/altera-stapl/Kconfig     |    2 +
 drivers/misc/altera-stapl/Makefile                 |    3 ++
 .../{staging => misc}/altera-stapl/altera-comp.c   |    0
 .../{staging => misc}/altera-stapl/altera-exprt.h  |    0
 .../{staging => misc}/altera-stapl/altera-jtag.c   |    2 +-
 .../{staging => misc}/altera-stapl/altera-jtag.h   |    0
 .../{staging => misc}/altera-stapl/altera-lpt.c    |    0
 drivers/{staging => misc}/altera-stapl/altera.c    |   35 +++++++------------
 drivers/staging/Kconfig                            |    2 -
 drivers/staging/Makefile                           |    1 -
 drivers/staging/altera-stapl/Makefile              |    3 --
 .../staging/altera-stapl => include/misc}/altera.h |    0
 16 files changed, 23 insertions(+), 31 deletions(-)
 rename drivers/{staging => misc}/altera-stapl/Kconfig (77%)
 create mode 100644 drivers/misc/altera-stapl/Makefile
 rename drivers/{staging => misc}/altera-stapl/altera-comp.c (100%)
 rename drivers/{staging => misc}/altera-stapl/altera-exprt.h (100%)
 rename drivers/{staging => misc}/altera-stapl/altera-jtag.c (99%)
 rename drivers/{staging => misc}/altera-stapl/altera-jtag.h (100%)
 rename drivers/{staging => misc}/altera-stapl/altera-lpt.c (100%)
 rename drivers/{staging => misc}/altera-stapl/altera.c (99%)
 delete mode 100644 drivers/staging/altera-stapl/Makefile
 rename {drivers/staging/altera-stapl => include/misc}/altera.h (100%)
#1 lore raw

Em 23-09-2011 14:26, Igor M. Liplianin escreveu:

Quoted 10 lines

The following changes since commit 3a7a62378be538944ff00904b8e0b795fe16609a:

[media] ati_remote: update Kconfig description (2011-09-22 10:55:10 -0300)

are available in the git repository at:
http://linuxtv.org/git/liplianin/media_tree.git netup_patches

Igor M. Liplianin (2):
cx23885: fix type error
altera-stapl: it is time to move out from staging

Applied, thanks!

There was a merge conflict with some patch(es) that were fixing the memory leak on some errors conditions, so, I've reverted the changes bellow.

Thanks,
Mauro.

drivers/misc/altera-stapl/altera.c renamed from drivers/staging/altera-stapl/altera.c +12 -21
@@ -2430,23 +2430,16 @@ int altera_init(struct altera_config *config, const struct firmware *fw)
 	int index = 0;
 	s32 offset = 0L;
 	s32 error_address = 0L;
-	int retval = 0;
 
-	key = kzalloc(33, GFP_KERNEL);
-	if (!key) {
-		retval = -ENOMEM;
-		goto out;
-	}
-	value = kzalloc(257, GFP_KERNEL);
-	if (!value) {
-		retval = -ENOMEM;
-		goto free_key;
-	}
+	key = kzalloc(33 * sizeof(char), GFP_KERNEL);
+	if (!key)
+		return -ENOMEM;
+	value = kzalloc(257 * sizeof(char), GFP_KERNEL);
+	if (!value)
+		return -ENOMEM;
 	astate = kzalloc(sizeof(struct altera_state), GFP_KERNEL);
-	if (!astate) {
-		retval = -ENOMEM;
-		goto free_value;
-	}
+	if (!astate)
+		return -ENOMEM;
 
 	astate->config = config;
 	if (!astate->config->jtag_io) {
@@ -2525,12 +2518,10 @@ int altera_init(struct altera_config *config, const struct firmware *fw)
 	} else if (exec_result)
 		printk(KERN_ERR "%s: error %d\n", __func__, exec_result);
 
-	kfree(astate);
-free_value:
-	kfree(value);
-free_key:
 	kfree(key);
-out:
-	return retval;
+	kfree(value);
+	kfree(astate);
+
+	return 0;
 }
 EXPORT_SYMBOL(altera_init);