Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

procfs: Remove unnecessary cleanup on proc_create failure #213

Merged
merged 1 commit into from
Jul 23, 2023
Merged

procfs: Remove unnecessary cleanup on proc_create failure #213

merged 1 commit into from
Jul 23, 2023

Conversation

keytouch
Copy link
Contributor

I found it unneccesary to call proc_remove or remove_proc_entry when proc_create returns NULL.
I searched through kernel and found existing code never call remove on failed creates.
I read the kernel source of drivers/input/input.c

@jserv jserv requested a review from linD026 July 23, 2023 12:23
Copy link
Collaborator

@linD026 linD026 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
After I roughly look into the proc_create and proc_remove, I think proc_remove is unnecessary. (Even though, I found a use case in here)

Thanks for the PR.

@jserv jserv merged commit 8172c03 into sysprog21:master Jul 23, 2023
1 check passed
@keytouch
Copy link
Contributor Author

keytouch commented Jul 23, 2023

@linD026 Yes, this use case in the link cleans up proc entries successfully created before the failed one.
And it seems rather smart this way.

@linD026
Copy link
Collaborator

linD026 commented Jul 23, 2023

Ah, I see.
My bad. Sorry for annoying you about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants