Skip to content

Commit

Permalink
uio_netx: get_dt_parameter() did not return the correct number of map…
Browse files Browse the repository at this point in the history
…pings.

Fixes #9
  • Loading branch information
sdoell-hilscher committed Dec 16, 2024
1 parent 5571118 commit 69b9a54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uio_netx/uio_netx.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ int get_dt_parameter(struct platform_device *pd, struct netx_custom_dev* custom)
int ret = 0;

while ((ret = of_address_to_resource(custom->dev->of_node, mappings, &res)) == 0) {
mappings++;
ret = ++mappings;
}
dev_info( custom->dev, "uio_netx - get_dt_parameter: found %d mappings!\n",mappings);
if (mappings == 0)
Expand Down Expand Up @@ -818,7 +818,7 @@ int get_dt_parameter(struct platform_device *pd, struct netx_custom_dev* custom)
ptr = of_get_property(custom->dev->of_node, "dma", NULL);
custom->dma_enable = !!!(*(uint32_t*)ptr) ? 1 : 0;
#endif
return mappings;
return ret;
}

static int __devinit netx_dt_probe(struct platform_device *pd)
Expand Down

0 comments on commit 69b9a54

Please sign in to comment.