]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: playstation: Prefer kzalloc(sizeof(*buf)...)
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tue, 24 Jun 2025 21:56:52 +0000 (00:56 +0300)
committerJiri Kosina <jkosina@suse.com>
Wed, 17 Sep 2025 09:33:43 +0000 (11:33 +0200)
commit400c6bbc7b48a011c18c765cd1fbb396113e2f63
treea91c5574395ef1e6c80bbb851ab3bce3e542af27
parentd9812f06be437c64e00fd557ed374100c97077cc
HID: playstation: Prefer kzalloc(sizeof(*buf)...)

Use the shorter variant as suggested by checkpatch.pl:

  CHECK: Prefer kzalloc(sizeof(*buf)...) over kzalloc(sizeof(struct dualsense_output_report_bt)...)

This also improves further maintainability.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Tested-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-playstation.c