Skip to content

Commit

Permalink
soc: ti: pruss: Remove wrong check against *get_match_data return value
Browse files Browse the repository at this point in the history
Since the of_device_get_match_data() doesn't return error code, remove
wrong IS_ERR test. Proper check against NULL pointer is already done
later before usage: if (data && data->...).

Additionally, proceeding with empty device data is valid (e.g. in case
of "ti,am3356-pruss").

Reported-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
  • Loading branch information
Grzegorz Jaszczyk authored and Santosh Shilimkar committed Nov 22, 2020
1 parent e83b235 commit 8465c7d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/soc/ti/pruss.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ static int pruss_clk_init(struct pruss *pruss, struct device_node *cfg_node)
int ret = 0;

data = of_device_get_match_data(dev);
if (IS_ERR(data))
return -ENODEV;

clks_np = of_get_child_by_name(cfg_node, "clocks");
if (!clks_np) {
Expand Down Expand Up @@ -175,10 +173,6 @@ static int pruss_probe(struct platform_device *pdev)
const char *mem_names[PRUSS_MEM_MAX] = { "dram0", "dram1", "shrdram2" };

data = of_device_get_match_data(&pdev->dev);
if (IS_ERR(data)) {
dev_err(dev, "missing private data\n");
return -ENODEV;
}

ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
if (ret) {
Expand Down

0 comments on commit 8465c7d

Please sign in to comment.