@@ -163,14 +163,14 @@ static int ice40_fpga_probe(struct spi_device *spi)
priv->cdone = devm_gpiod_get(dev, "cdone", GPIOD_IN);
if (IS_ERR(priv->cdone)) {
ret = PTR_ERR(priv->cdone);
- dev_err(dev, "Failed to get CDONE GPIO: %ld\n", ret);
+ dev_err(dev, "Failed to get CDONE GPIO: %d\n", ret);
return ret;
}
priv->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(priv->reset)) {
ret = PTR_ERR(priv->reset);
- dev_err(dev, "Failed to get CRESET_B GPIO: %ld\n", ret);
+ dev_err(dev, "Failed to get CRESET_B GPIO: %d\n", ret);
return ret;
}
@@ -117,7 +117,6 @@ static int ts73xx_fpga_probe(struct platform_device *pdev)
struct device *kdev = &pdev->dev;
struct ts73xx_fpga_priv *priv;
struct resource *res;
- int err;
priv = devm_kzalloc(kdev, sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -132,14 +131,8 @@ static int ts73xx_fpga_probe(struct platform_device *pdev)
return PTR_ERR(priv->io_base);
}
- err = fpga_mgr_register(kdev, "TS-73xx FPGA Manager",
- &ts73xx_fpga_ops, priv);
- if (err) {
- dev_err(kdev, "failed to register FPGA manager\n");
- return err;
- }
-
- return err;
+ return fpga_mgr_register(kdev, "TS-73xx FPGA Manager",
+ &ts73xx_fpga_ops, priv);
}
static int ts73xx_fpga_remove(struct platform_device *pdev)