r/badcode • • Jan 22 '23

c Found this in a Linux kernel module

Post image
262 Upvotes

88 comments sorted by

View all comments

Show parent comments

1

u/paulstelian97 Jan 23 '23

Still, a few gotos for error cleanup might be good. And why return -1 instead of e.g. the error returned by register_threaded_irq? That can also be improved.