- t_ptr = (char *)(sep + 1);
-
- if (strncmp("dpni", t_ptr, 4) &&
- strncmp("dpseci", t_ptr, 6) &&
- strncmp("dpcon", t_ptr, 5) &&
- strncmp("dpbp", t_ptr, 4) &&
- strncmp("dpio", t_ptr, 4) &&
- strncmp("dpci", t_ptr, 4) &&
- strncmp("dpmcp", t_ptr, 5) &&
- strncmp("dpdmai", t_ptr, 6)) {
- DPAA2_BUS_ERR("Unknown or unsupported device");
- return -EINVAL;
+ /* 'name' is expected to contain name of device, for example, dpio.1,
+ * dpni.2, etc.
+ */
+ if (strncmp("dpni", name, 4) &&
+ strncmp("dpseci", name, 6) &&
+ strncmp("dpcon", name, 5) &&
+ strncmp("dpbp", name, 4) &&
+ strncmp("dpio", name, 4) &&
+ strncmp("dpci", name, 4) &&
+ strncmp("dpmcp", name, 5) &&
+ strncmp("dpdmai", name, 6) &&
+ strncmp("dpdmux", name, 6)) {
+ DPAA2_BUS_DEBUG("Unknown or unsupported device (%s)", name);
+ goto err_out;