Hi,
On 2021/3/9 21:22, Yicong Yang wrote:
+static int hisi_i2c_probe(struct platform_device *pdev) +{
- struct hisi_i2c_controller *ctlr;
- struct device *dev = &pdev->dev;
- struct i2c_adapter *adapter;
- u32 hw_version;
- int ret;
- ctlr = devm_kzalloc(dev, sizeof(*ctlr), GFP_KERNEL);
- if (!ctlr)
return -ENOMEM;
- ctlr->dev = dev;
- ctlr->iobase = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(ctlr->iobase))
return PTR_ERR(ctlr->iobase);
- ctlr->irq = platform_get_irq(pdev, 0);
- if (ctlr->irq <= 0)
return -ENOENT;
here doesn't handle the -EPROBE_DEFER case, thanks john for noticing this.
Any other comments for this driver? or i'll send a v2 one with this fixed.
Thanks, Yicong