chore(gpio): add missing errdefer

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:13:11 -03:00
parent 5103fdf646
commit 44b2e9be88
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,8 @@ pub const Gpio = struct {
log.info("Device: {}", .{kind});
const self = try allocator.create(Self);
errdefer allocator.destroy(self);
self.* = .{
.data = 0b0000,
.direction = 0b1111, // TODO: What is GPIO DIrection set to by default?