summaryrefslogtreecommitdiff
path: root/drivers/of/device.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2021-10-12 12:03:58 -0400
committerRodrigo Vivi <rodrigo.vivi@intel.com>2021-10-12 12:03:58 -0400
commitd9f673051ab54dd5263fef6da97ef08feedaa754 (patch)
tree6d7e19bd3345bd43e3488d17f6cb60ff16289b3d /drivers/of/device.c
parent814c8757115f9d7135126ac43d3a178b31e796dd (diff)
parent1176d15f0f6e556d54ced510ac4a91694960332b (diff)
Merge drm/drm-next into drm-intel-next
Need to resync drm-intel-next with TTM and PXP stuff from drm-intel-gt-next that is now in drm/drm-next. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/of/device.c')
-rw-r--r--drivers/of/device.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 5b043ee30824..b0800c260f64 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -85,7 +85,11 @@ of_dma_set_restricted_buffer(struct device *dev, struct device_node *np)
break;
}
- if (i != count && of_reserved_mem_device_init_by_idx(dev, of_node, i))
+ /*
+ * Attempt to initialize a restricted-dma-pool region if one was found.
+ * Note that count can hold a negative error code.
+ */
+ if (i < count && of_reserved_mem_device_init_by_idx(dev, of_node, i))
dev_warn(dev, "failed to initialise \"restricted-dma-pool\" memory node\n");
}