diff options
author | Liav A <liavalb@gmail.com> | 2023-04-11 13:11:02 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-04-14 19:23:12 +0200 |
commit | dd7633c5f418952390d056146510040d08125ee4 (patch) | |
tree | af2f79dbbdacb184930099081123c4b073f7b8a5 /Kernel/Devices/Audio/Channel.h | |
parent | 4921561687ec5775be1ad7f9210a2c7483fff244 (diff) | |
download | serenity-dd7633c5f418952390d056146510040d08125ee4.zip |
Kernel/Audio: Propagate errors when creating AudioChannels
While doing this, we can also just return a normal RefPtr instead of a
LockRefPtr, because we create these channels when initializing an audio
controller, and never change the pointer in AudioController instances
after their initialization, hence no locking is necessary.
Diffstat (limited to 'Kernel/Devices/Audio/Channel.h')
-rw-r--r-- | Kernel/Devices/Audio/Channel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Devices/Audio/Channel.h b/Kernel/Devices/Audio/Channel.h index 7106bd9ae2..188264a8de 100644 --- a/Kernel/Devices/Audio/Channel.h +++ b/Kernel/Devices/Audio/Channel.h @@ -20,7 +20,7 @@ class AudioChannel final friend class DeviceManagement; public: - static NonnullLockRefPtr<AudioChannel> must_create(AudioController const&, size_t channel_index); + static ErrorOr<NonnullRefPtr<AudioChannel>> create(AudioController const&, size_t channel_index); virtual ~AudioChannel() override = default; // ^CharacterDevice |