@@ -392,14 +392,10 @@ static int it913x_probe(struct platform_device *pdev)
struct it913x_dev *dev;
const struct platform_device_id *id = platform_get_device_id(pdev);
- int ret;
char *chip_ver_str;
dev = kzalloc(sizeof(struct it913x_dev), GFP_KERNEL);
- if (dev == NULL) {
- ret = -ENOMEM;
- dev_err(&pdev->dev, "kzalloc() failed\n");
- goto err;
- }
+ if (!dev)
+ return -ENOMEM;
dev->pdev = pdev;
dev->regmap = pdata->regmap;
@@ -423,9 +419,6 @@ static int it913x_probe(struct platform_device *pdev)
chip_ver_str);
dev_dbg(&pdev->dev, "chip_ver %u, role %u\n", dev->chip_ver, dev->role);
return 0;
-err:
- dev_dbg(&pdev->dev, "failed %d\n", ret);
- return ret;
}
static int it913x_remove(struct platform_device *pdev)