Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i3c: master: Fix error return in cdns_i3c_master_probe()

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 <jingxiangfeng@huawei.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-i3c/20200911033350.23904-1-jingxiangfeng@huawei.com

authored by

Jing Xiangfeng and committed by
Boris Brezillon
abea14bf cc3a392d

+3 -1
+3 -1
drivers/i3c/master/i3c-master-cdns.c
··· 1635 1635 master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots, 1636 1636 sizeof(*master->ibi.slots), 1637 1637 GFP_KERNEL); 1638 - if (!master->ibi.slots) 1638 + if (!master->ibi.slots) { 1639 + ret = -ENOMEM; 1639 1640 goto err_disable_sysclk; 1641 + } 1640 1642 1641 1643 writel(IBIR_THR(1), master->regs + CMD_IBI_THR_CTRL); 1642 1644 writel(MST_INT_IBIR_THR, master->regs + MST_IER);