diff --git a/drivers/coresight/coresight-etm.c b/drivers/coresight/coresight-etm.c index 73c14996cace..ffbc6e7f65b0 100644 --- a/drivers/coresight/coresight-etm.c +++ b/drivers/coresight/coresight-etm.c @@ -2045,6 +2045,11 @@ static int __devinit etm_probe(struct platform_device *pdev) pdev->dev.platform_data = pdata; } +#ifdef CONFIG_SMP + if (count >= setup_max_cpus) + return -ENODEV; +#endif + drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); if (!drvdata) return -ENOMEM;