Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3361990ybh; Mon, 16 Mar 2020 21:54:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtl8IEAiGWnTJ0yA6Ig9wgNS59NOziFS9CzynfYL1mBB4CbkqELpKYAVzElAzBsSJaq8rHY X-Received: by 2002:aca:37c3:: with SMTP id e186mr2214115oia.155.1584420864623; Mon, 16 Mar 2020 21:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584420864; cv=none; d=google.com; s=arc-20160816; b=AnliKlPWTEfAkBxrrU04TsdceCCoaDHW41Kbcyc/6gOMaWUkbu5s8K5kOWecd0kUkU H8zIrviNU0qnLfh19JQrty1H7O9QIKkjhDHO9syCvuhc4oQxR3H5JD43yclLlSMcPFUw k1qsIAhya3vxnf422S7pQ85FG2IOTonxGuQPhPZnAVUb1lPCdZRzrDWORYCzEcNx8rfU GynWo9/Ixk6de8vYikDEcZiOOamdFlMJSD4Rv5unjusd8W7ggrAkSG7/PerdodXy4Zva OJxDS7GS2+BRXGNgdJhMM2ISbMXMBiBUhVITiuygLELE9C+AqlD1kS4COy5DZECszCW5 9Csw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=E17silW7K4zE4aUnYxC29i6t6YyS9hQDZKzsoHaks7E=; b=WGcyyxq+uHA0J8GC0b87WT3HvHy2wLAS8+x3X0iFXoaZptiw/oKJwDPiudLIW3QMzf dED6/drX0vN5CAGuDcOyCD6XPle7Jdls55qOu0lTSSyrxAN8gipTdkMRbuNiXwacKtxI K2cuPCQr/U4MndflP86GOb0MbqZClGW/dARfMPmbGiu9TJfmDnKByDU6JbbbF6xG3mzw QkxHG443CYWDwRuFZxRJRoIv0/B+sERBZoWRYYgxJb286ac+Ivzz5BvJLu5J0sd7ovDw 9lPy61lgDo3f902fMArbWth/HNq26t2Q6F/Bj1QYe6rbHUQXI+aX2LWb1euwNXm9/lVB ASig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=ZSU+aYcZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c201si1129314oib.57.2020.03.16.21.54.13; Mon, 16 Mar 2020 21:54:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=ZSU+aYcZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgCQEZK (ORCPT + 99 others); Tue, 17 Mar 2020 00:25:10 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46974 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbgCQEZK (ORCPT ); Tue, 17 Mar 2020 00:25:10 -0400 Received: by mail-wr1-f68.google.com with SMTP id w16so7469271wrv.13 for ; Mon, 16 Mar 2020 21:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=E17silW7K4zE4aUnYxC29i6t6YyS9hQDZKzsoHaks7E=; b=ZSU+aYcZKv7IYzrKBs+ASvuHnrUYTdfHPm8BNUUEHLI6/7Lh89YNbDIQJL64cDrFLd QISmRdyZZQg9B4UzREcKPO/O5gJ3B+kADfb0wIrnF4j6XIiECnJQ1SwSGjfR+zlQhZkN WnaF9QqKVCynUrgCl7xMSL9qY+zzGnT0rk0R4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=E17silW7K4zE4aUnYxC29i6t6YyS9hQDZKzsoHaks7E=; b=UNB/02s/IgGZluyehyg/aYwQaCUeikVOrZHGTmlsDZ/JOH6HMPsSXWVEEEuPFU/36S rJ5EXcGjiIdy/q3vaTMuIvNGek7CSfss6kUSQHTi06WPUE6HR20o8BBIlZNtupvYqzh5 8wToAyeJBnJt0eSPsIuciHw232FpjI0rNBf9lh6kVQYaxAH9G9bxpcKrR3LXwkMYtpUo Us/DrYxU7RSmLl12puHzKOY4vSZ9uLN88rzN/MN/vjST+5xGcNAkOG8Mt07f9WeYim6H H65+Dr5e2c2N/0Szvf1bQRpABC+PBbfr/uLCzYooJwaTbSPyPuyCHG6PRWbdQlZ3spqj kaQQ== X-Gm-Message-State: ANhLgQ21uI13jj4n4YaG0I1d9Yr4jIw3afgPXSGd+hIlLMwQfaDSB08h nxRiMlmKhaOJxxkyhxY/6ZanBQ== X-Received: by 2002:adf:e98c:: with SMTP id h12mr3370624wrm.345.1584419108218; Mon, 16 Mar 2020 21:25:08 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q4sm2841396wro.56.2020.03.16.21.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 21:25:07 -0700 (PDT) From: Rayagonda Kokatanur To: Jassi Brar , linux-kernel@vger.kernel.org, BCM Kernel Feedback Cc: Rayagonda Kokatanur Subject: [PATCH v1 1/1] maillbox: bcm-flexrm-mailbox: handle cmpl_pool dma allocation failure Date: Tue, 17 Mar 2020 09:52:16 +0530 Message-Id: <20200317042216.20623-1-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Handle 'cmpl_pool' dma memory allocation failure. Signed-off-by: Rayagonda Kokatanur --- drivers/mailbox/bcm-flexrm-mailbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c index 8ee9db274802..bee33abb5308 100644 --- a/drivers/mailbox/bcm-flexrm-mailbox.c +++ b/drivers/mailbox/bcm-flexrm-mailbox.c @@ -1599,6 +1599,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev) 1 << RING_CMPL_ALIGN_ORDER, 0); if (!mbox->cmpl_pool) { ret = -ENOMEM; + goto fail_destroy_bd_pool; } /* Allocate platform MSIs for each ring */ @@ -1661,6 +1662,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev) platform_msi_domain_free_irqs(dev); fail_destroy_cmpl_pool: dma_pool_destroy(mbox->cmpl_pool); +fail_destroy_bd_pool: dma_pool_destroy(mbox->bd_pool); fail: return ret; -- 2.17.1