diff --git a/drivers/hwmon/max197.c b/drivers/hwmon/max197.c index 96dccaf919d1da4c02b26de8f937f5c401f84ff4..82128ad79a911c893e784b8a5623f1e04c4afb5a 100644 --- a/drivers/hwmon/max197.c +++ b/drivers/hwmon/max197.c @@ -275,10 +275,8 @@ static int max197_probe(struct platform_device *pdev) } data = devm_kzalloc(&pdev->dev, sizeof(struct max197_data), GFP_KERNEL); - if (!data) { - dev_err(&pdev->dev, "devm_kzalloc failed\n"); + if (!data) return -ENOMEM; - } data->pdata = pdata; mutex_init(&data->lock);