mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 07:54:36 -05:00
EDAC/versalnet: Return the correct error in mc_probe()
Return -ENOMEM if memory allocation in mc_probe() fails.
[ bp: Massage commit message. ]
Fixes: d5fe2fec6c ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
This commit is contained in:
committed by
Borislav Petkov (AMD)
parent
6e1c2c6c2c
commit
c2fcb2e79d
@@ -888,8 +888,10 @@ static int mc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
if (!priv) {
|
||||
rc = -ENOMEM;
|
||||
goto err_alloc;
|
||||
}
|
||||
|
||||
amd_rpmsg_id_table[0].driver_data = (kernel_ulong_t)priv;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user