From 737d582ea3f602d2fa27026051849ce7eda661d6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Jul 2023 19:39:05 +0200 Subject: [PATCH] boot: fix redundant error check in markSuccessful() This commit removes an error check that is unnecessary. No new error is created here and err is already checked 4 lines above. --- boot/bootstate20.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/boot/bootstate20.go b/boot/bootstate20.go index 32cca412e45..0ef2ad2ac25 100644 --- a/boot/bootstate20.go +++ b/boot/bootstate20.go @@ -880,9 +880,6 @@ func (brs20 *bootState20Model) markSuccessful(update bootStateUpdate) (bootState // sign key ID was not being populated in earlier versions of snapd, try // to remedy that if u20.modeenv.ModelSignKeyID == "" { - if err != nil { - return nil, err - } u20.writeModeenv.ModelSignKeyID = brs20.dev.Model().SignKeyID() } return u20, nil