ret = of_property_read_u32(node, "xlnx,axi-str-rxd-tdata-width",
&value);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,axi-str-rxd-tdata-width property\n");
- goto end;
- } else if (value != 32) {
- dev_err(fifo->dt_device, "xlnx,axi-str-rxd-tdata-width only supports 32 bits\n");
- ret = -EIO;
- goto end;
- }
+ if (ret)
+ return ret;
+ if (value != 32)
+ return -EINVAL;
ret = of_property_read_u32(node, "xlnx,axi-str-txd-tdata-width",
&value);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,axi-str-txd-tdata-width property\n");
- goto end;
- } else if (value != 32) {
- dev_err(fifo->dt_device, "xlnx,axi-str-txd-tdata-width only supports 32 bits\n");
- ret = -EIO;
- goto end;
- }
+ if (ret)
+ return ret;
+ if (value != 32)
+ return -EINVAL;
ret = of_property_read_u32(node, "xlnx,rx-fifo-depth",
&fifo->rx_fifo_depth);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,rx-fifo-depth property\n");
- ret = -EIO;
- goto end;
- }
+ if (ret)
+ return ret;
ret = of_property_read_u32(node, "xlnx,tx-fifo-depth",
&fifo->tx_fifo_depth);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,tx-fifo-depth property\n");
- ret = -EIO;
- goto end;
- }
+ if (ret)
+ return ret;
ret = of_property_read_u32(node, "xlnx,use-rx-data",
&fifo->has_rx_fifo);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,use-rx-data property\n");
- ret = -EIO;
- goto end;
- }
+ if (ret)
+ return ret;
ret = of_property_read_u32(node, "xlnx,use-tx-data",
&fifo->has_tx_fifo);
- if (ret) {
- dev_err(fifo->dt_device, "missing xlnx,use-tx-data property\n");
- ret = -EIO;
- goto end;
- }
+ if (ret)
+ return ret;
-end:
- return ret;
+ return 0;
}
static int axis_fifo_probe(struct platform_device *pdev)