Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221548
b: refs/heads/master
c: fd0977d
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Juhl authored and Takashi Iwai committed Nov 2, 2010
1 parent 60a2fd1 commit ba0cfa1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7467452291f7c9e5e1271e8c8e45b77f34b1257
refs/heads/master: fd0977d0f42d3e73121b88f57c7d48ca9b861a58
2 changes: 2 additions & 0 deletions trunk/sound/pci/asihpi/hpi6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,8 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
control_cache_size, (struct hpi_control_cache_info *)
&phw->control_cache[0]
);
if (!phw->p_cache)
pao->has_control_cache = 0;
} else
pao->has_control_cache = 0;

Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/pci/asihpi/hpi6205.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,8 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
interface->control_cache.size_in_bytes,
(struct hpi_control_cache_info *)
p_control_cache_virtual);
if (!phw->p_cache)
err = HPI_ERROR_MEMORY_ALLOC;
}
if (!err) {
err = hpios_locked_mem_get_phys_addr(&phw->
Expand Down
12 changes: 9 additions & 3 deletions trunk/sound/pci/asihpi/hpicmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,20 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32
{
struct hpi_control_cache *p_cache =
kmalloc(sizeof(*p_cache), GFP_KERNEL);
if (!p_cache)
return NULL;
p_cache->p_info =
kmalloc(sizeof(*p_cache->p_info) * number_of_controls,
GFP_KERNEL);
if (!p_cache->p_info) {
kfree(p_cache);
return NULL;
}
p_cache->cache_size_in_bytes = size_in_bytes;
p_cache->control_count = number_of_controls;
p_cache->p_cache =
(struct hpi_control_cache_single *)pDSP_control_buffer;
p_cache->init = 0;
p_cache->p_info =
kmalloc(sizeof(*p_cache->p_info) * p_cache->control_count,
GFP_KERNEL);
return p_cache;
}

Expand Down

0 comments on commit ba0cfa1

Please sign in to comment.