Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1113523pxx; Tue, 27 Oct 2020 08:32:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu6sNx0k/eS5WjcgEgth156QpF7jVolLoRNV5yQjQW8qO9SGHdrLQX9GUhMPFNZWWFEWsn X-Received: by 2002:aa7:c915:: with SMTP id b21mr2842194edt.25.1603812766495; Tue, 27 Oct 2020 08:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603812766; cv=none; d=google.com; s=arc-20160816; b=VXTLi4/iWE6/ALU6u1nyNc3wfanB/PiHAetWvxHNMRC8X7FWgE8isCernJS+zs8r1A EmuK1UdbGKk8NZnNJU1hRrC9eYQ1LmJvPraX7ptcD4av8kSbhyl5NUt5JZyP1FnJRb5Q 4RxJCn74MZsDJQshtpEty09KSjQgY1ZIErF0IqjqACOTAtkACpBSvrM9x/a9Esbzhtif PEjUXXsDE+yl5ORDKDl6AyhKlwPklbUZuXSR5S7wpBpUPYvL5y0wGxWx+KXbPhkrYNx+ 0JjqBUbDP1Orr4eB5kFG7l7+DnsK5G/qbXgc2p/5jH/ApWtCSCP+WW8F6YLNJAm6Lr6x W/Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0xNzU2qkk2vFp06RPgk8ZYWsKnszTqUm0Iv8b4cz1hg=; b=YszuMzHpID4rbttmwlmN9rL/H44vrjQVuHOvVtl0Hq2tEtsJDviSyMW/FJDAe8ukL/ IebuQ77fwK8gwYTmd/BQRc5S0YCdDfxNKzsR/aDHKwzHYLfNl4StaxYkrLacsCt+ywZU gT8PQiPzlz8MTJu/nYD1JvWN6KK2wT2yun/xD5Fh4rfukZ4NhJLdCDjf0QFBzxdx1uGK WF6PmVq4CguB/W4E13WFONnPWhEauXSzQVpt9bo69wfbmtNmTlD6Wsoi6LR5cnRTDKs0 cYPx1zCIgyjCrBzhWzplgWn+hOi6LL0NlRMx5zDqeIiL+OgwBbwUAEMsMZRjg4FKuVjm 9Jng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hrz6PbUv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si1224366ejt.670.2020.10.27.08.32.24; Tue, 27 Oct 2020 08:32:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hrz6PbUv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750004AbgJ0Oly (ORCPT + 99 others); Tue, 27 Oct 2020 10:41:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:39266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761566AbgJ0OkA (ORCPT ); Tue, 27 Oct 2020 10:40:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86E90206B2; Tue, 27 Oct 2020 14:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809600; bh=lIXOfBfINf2wzSPboSFqNfQuP+/BvFDMm1SrkXYs+c0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hrz6PbUvHzlL26dJ2RkLq3sRap9UXmLi7qZt8NU43EBknYJBx194+eTto7LZElcrX 5aiwP8DDZAAUHyemijhXyX/LDrrgzoHSn33n8vA8gKTN1xnZPbIiUl6yM+25Kp7kfD bEHj+Jcm9AyNcJabw9OF2m4/BWbUratMY5ghx9gM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jing Xiangfeng , Boris Brezillon , Sasha Levin Subject: [PATCH 5.4 246/408] i3c: master: Fix error return in cdns_i3c_master_probe() Date: Tue, 27 Oct 2020 14:53:04 +0100 Message-Id: <20201027135506.466308641@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jing Xiangfeng [ Upstream commit abea14bfdebbe9bd02f2ad24a1f3a878ed21c8f0 ] Fix to return negative error code -ENOMEM from the error handling case instead of 0. Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Jing Xiangfeng Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/20200911033350.23904-1-jingxiangfeng@huawei.com Signed-off-by: Sasha Levin --- drivers/i3c/master/i3c-master-cdns.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c index 10db0bf0655a9..6d5719cea9f53 100644 --- a/drivers/i3c/master/i3c-master-cdns.c +++ b/drivers/i3c/master/i3c-master-cdns.c @@ -1593,8 +1593,10 @@ static int cdns_i3c_master_probe(struct platform_device *pdev) master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots, sizeof(*master->ibi.slots), GFP_KERNEL); - if (!master->ibi.slots) + if (!master->ibi.slots) { + ret = -ENOMEM; goto err_disable_sysclk; + } writel(IBIR_THR(1), master->regs + CMD_IBI_THR_CTRL); writel(MST_INT_IBIR_THR, master->regs + MST_IER); -- 2.25.1