]> git.karo-electronics.de Git - linux-beck.git/commitdiff
soc: ti: knav_qmss_queue: Return proper error if devm_kzalloc fails
authorAxel Lin <axel.lin@ingics.com>
Mon, 27 Oct 2014 16:37:35 +0000 (09:37 -0700)
committerSantosh Shilimkar <ssantosh@kernel.org>
Mon, 27 Oct 2014 16:37:35 +0000 (09:37 -0700)
Return -ENOMEM if devm_kzalloc fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
drivers/soc/ti/knav_qmss_queue.c

index d66aaf2c2ecd48539b7fa7be64be0f73d6c162f7..6f22d5622c98d6996356d91bb236fda3566d84a7 100644 (file)
@@ -1640,7 +1640,7 @@ static int knav_queue_init_queues(struct knav_device *kdev)
        size = (1 << kdev->inst_shift) * kdev->num_queues_in_use;
        kdev->instances = devm_kzalloc(kdev->dev, size, GFP_KERNEL);
        if (!kdev->instances)
-               return -1;
+               return -ENOMEM;
 
        for_each_queue_range(kdev, range) {
                if (range->ops && range->ops->init_range)