From: Axel Lin Date: Mon, 27 Oct 2014 16:37:35 +0000 (-0700) Subject: soc: ti: knav_qmss_queue: Return proper error if devm_kzalloc fails X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=39179cb5b789e0c0275ccb8fa83cfaf9257d1474;p=linux-beck.git soc: ti: knav_qmss_queue: Return proper error if devm_kzalloc fails Return -ENOMEM if devm_kzalloc fails. Signed-off-by: Axel Lin Signed-off-by: Santosh Shilimkar --- diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index d66aaf2c2ecd..6f22d5622c98 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -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)