chore(gpio): add missing errdefer
This commit is contained in:
parent
b133880064
commit
26dba16789
|
@ -68,6 +68,8 @@ pub const Gpio = struct {
|
||||||
log.info("Device: {}", .{kind});
|
log.info("Device: {}", .{kind});
|
||||||
|
|
||||||
const self = try allocator.create(Self);
|
const self = try allocator.create(Self);
|
||||||
|
errdefer allocator.destroy(self);
|
||||||
|
|
||||||
self.* = .{
|
self.* = .{
|
||||||
.data = 0b0000,
|
.data = 0b0000,
|
||||||
.direction = 0b1111, // TODO: What is GPIO DIrection set to by default?
|
.direction = 0b1111, // TODO: What is GPIO DIrection set to by default?
|
||||||
|
|
Loading…
Reference in New Issue