Thread (9 messages) flat view 9 messages, 2 authors, 2012-01-20
DORMANTno replies

Revision v1 of 12 in this series.

Revisions (12)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 current
  5. v1 [diff vs current]
  6. v1 [diff vs current]
  7. v1 [diff vs current]
  8. v1 [diff vs current]
  9. v1 [diff vs current]
  10. v1 [diff vs current]
  11. v1 [diff vs current]
  12. v1 [diff vs current]

[PATCH 2/6] drivers/base: add bus for System-on-Chip devices

From: Greg KH <hidden>
Date: 2012-01-20 16:39:47

On Fri, Jan 20, 2012 at 04:10:25PM +0000, Lee Jones wrote:
+struct soc_device *soc_device_register(struct soc_device_attribute *soc_dev_attr)
+{
+	struct soc_device *soc_dev;
+	int ret;
+	int i, j = 0;
+
+	soc_dev = kzalloc(sizeof(*soc_dev), GFP_KERNEL);
+	if (!soc_dev) {
+	        ret = -ENOMEM;
+		goto out1;
+	}
<snip>
+out1:
+	kfree(soc_dev_attr);
You just freed the caller's memory, are you sure you wanted to do that?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help