Merge tag 'devprop-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-microblaze.git] / drivers / fpga / xilinx-spi.c
index 27defa9..fee4d0a 100644 (file)
@@ -233,25 +233,19 @@ static int xilinx_spi_probe(struct spi_device *spi)
 
        /* PROGRAM_B is active low */
        conf->prog_b = devm_gpiod_get(&spi->dev, "prog_b", GPIOD_OUT_LOW);
-       if (IS_ERR(conf->prog_b)) {
-               dev_err(&spi->dev, "Failed to get PROGRAM_B gpio: %ld\n",
-                       PTR_ERR(conf->prog_b));
-               return PTR_ERR(conf->prog_b);
-       }
+       if (IS_ERR(conf->prog_b))
+               return dev_err_probe(&spi->dev, PTR_ERR(conf->prog_b),
+                                    "Failed to get PROGRAM_B gpio\n");
 
        conf->init_b = devm_gpiod_get_optional(&spi->dev, "init-b", GPIOD_IN);
-       if (IS_ERR(conf->init_b)) {
-               dev_err(&spi->dev, "Failed to get INIT_B gpio: %ld\n",
-                       PTR_ERR(conf->init_b));
-               return PTR_ERR(conf->init_b);
-       }
+       if (IS_ERR(conf->init_b))
+               return dev_err_probe(&spi->dev, PTR_ERR(conf->init_b),
+                                    "Failed to get INIT_B gpio\n");
 
        conf->done = devm_gpiod_get(&spi->dev, "done", GPIOD_IN);
-       if (IS_ERR(conf->done)) {
-               dev_err(&spi->dev, "Failed to get DONE gpio: %ld\n",
-                       PTR_ERR(conf->done));
-               return PTR_ERR(conf->done);
-       }
+       if (IS_ERR(conf->done))
+               return dev_err_probe(&spi->dev, PTR_ERR(conf->done),
+                                    "Failed to get DONE gpio\n");
 
        mgr = devm_fpga_mgr_create(&spi->dev,
                                   "Xilinx Slave Serial FPGA Manager",