Message ID | 20200213151919.611428309@linuxfoundation.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Paul Burton |
Headers | show |
Series | None | expand |
--- a/arch/mips/loongson64/platform.c +++ b/arch/mips/loongson64/platform.c @@ -27,6 +27,9 @@ static int __init loongson3_platform_ini continue; pdev = kzalloc(sizeof(struct platform_device), GFP_KERNEL); + if (!pdev) + return -ENOMEM; + pdev->name = loongson_sysconf.sensors[i].name; pdev->id = loongson_sysconf.sensors[i].id; pdev->dev.platform_data = &loongson_sysconf.sensors[i];