Merge tag 'for-linus' of git://github.com/openrisc/linux
[linux-2.6-microblaze.git] / sound / core / pcm_lib.c
index bda3514..b7e3d8f 100644 (file)
@@ -1129,8 +1129,8 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond,
        if (constrs->rules_num >= constrs->rules_all) {
                struct snd_pcm_hw_rule *new;
                unsigned int new_rules = constrs->rules_all + 16;
-               new = krealloc(constrs->rules, new_rules * sizeof(*c),
-                              GFP_KERNEL);
+               new = krealloc_array(constrs->rules, new_rules,
+                                    sizeof(*c), GFP_KERNEL);
                if (!new) {
                        va_end(args);
                        return -ENOMEM;