mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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>
This commit is contained in:
parent
d9812f06be
commit
400c6bbc7b
|
|
@ -1531,9 +1531,9 @@ static void dualsense_remove(struct ps_device *ps_dev)
|
|||
static int dualsense_reset_leds(struct dualsense *ds)
|
||||
{
|
||||
struct dualsense_output_report report;
|
||||
u8 *buf;
|
||||
struct dualsense_output_report_bt *buf;
|
||||
|
||||
buf = kzalloc(sizeof(struct dualsense_output_report_bt), GFP_KERNEL);
|
||||
buf = kzalloc(sizeof(*buf), GFP_KERNEL);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user