chore(gpio): add missing errdefer

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-17 20:01:50 -03:00
parent b133880064
commit 26dba16789
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?