[PATCH 0/1] HID: hid-betopff.c: Use devm_kzalloc, move _init() code into _probe().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Huang,

the code of hid-betopff.c served as my guide when writing a
driver for a different gamepad device. Thanks!

My code is currently undergoing review and Benjamin wrote that
one should use devm_kzalloc() these days, as it makes memory
management and error handling easier.

Also, it appears that the way your _probe() function hands over
to _init() will result in _init() errors not being reported back
to the caller of _probe().

Allow me to suggest these changes to your code.

I do not own the gamepad you wrote your driver for. My patched
version compiles cleanly, but please have a look over it.

Thank you,

Hanno
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux