]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - sound/pci/asihpi/hpi6205.c
ALSA: asihpi - Unsafe memory management when allocating control cache
[net-next-2.6.git] / sound / pci / asihpi / hpi6205.c
index 22c5fc6255335ac94aca5ac297432f16b0950c4e..2672f6591ceb7246b9a0a24ecbfa8f4cf2c46288 100644 (file)
@@ -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->