From: Boris Brezillon <boris.brezillon@collabora.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>
Cc: linux-kernel@vger.kernel.org, pgaj@cadence.com,
linux-i3c@lists.infradead.org, bbrezillon@kernel.org
Subject: Re: [PATCH] i3c: master: Fix error return in cdns_i3c_master_probe()
Date: Wed, 7 Oct 2020 15:15:34 +0200 [thread overview]
Message-ID: <20201007151534.6fd4d5d7@collabora.com> (raw)
In-Reply-To: <20200911033350.23904-1-jingxiangfeng@huawei.com>
On Fri, 11 Sep 2020 11:33:50 +0800
Jing Xiangfeng <jingxiangfeng@huawei.com> wrote:
> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0.
>
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Queued to i3c/next.
Thanks,
Boris
> ---
> 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 3fee8bd7fe20..3f2226928fe0 100644
> --- a/drivers/i3c/master/i3c-master-cdns.c
> +++ b/drivers/i3c/master/i3c-master-cdns.c
> @@ -1635,8 +1635,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);
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
prev parent reply other threads:[~2020-10-07 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 3:33 [PATCH] i3c: master: Fix error return in cdns_i3c_master_probe() Jing Xiangfeng
2020-10-07 13:15 ` Boris Brezillon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201007151534.6fd4d5d7@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=bbrezillon@kernel.org \
--cc=jingxiangfeng@huawei.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgaj@cadence.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).