mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel/USB: Don't invoke async callback if transfer data size is 0
We can't do anything valuable with such "transfer" so just discard it.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
e7c1148ec6
commit
430e987078
@@ -61,6 +61,8 @@ ErrorOr<void> Transfer::write_buffer(u16 len, UserOrKernelBuffer data)
|
||||
|
||||
void Transfer::invoke_async_callback()
|
||||
{
|
||||
if (transfer_data_size() == 0)
|
||||
return;
|
||||
if (m_callback)
|
||||
m_callback(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user