Skip to content

Latest commit broke dma-proxy-test #13

@jr4417

Description

@jr4417

Changes to dma-proxy.c in the latest commit have broken the dma-proxy-test. For instance line (436):

if (!local_class_p) {
local_class_p = class_create(
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6, 3, 13)
THIS_MODULE,
#endif
DRIVER_NAME
);
pchannel_p->class_p = local_class_p; <--------This line (436) needs to move after the if(!local_class_p) statement
if (IS_ERR_OR_NULL(local_class_p)) {
dev_err(pchannel_p->dma_device_p, "unable to create class\n");
if(!local_class_p) {
return -ENOMEM;
} else {
return ERR_PTR(local_class_p);
}
goto init_error2;
}
}

This line does not allow for a second device to be added to the /dev/ folder. After moving this outside of the if the second device was able to be created. The dma-proxy-test still did not work. I had to go back to the 6060d20 commit and the test worked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions