Skip to content

Commit

Permalink
Return err if open fails:
Browse files Browse the repository at this point in the history
Returning the error will ensure the provider
is removed from future calls.
  • Loading branch information
jacobweinstock committed Feb 27, 2024
1 parent e23dfc5 commit 90f2257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/openbmc/openbmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func New(host, user, pass string, log logr.Logger, opts ...Option) *Conn {
// Open a connection to a BMC via redfish
func (c *Conn) Open(ctx context.Context) (err error) {
if err := c.deviceSupported(ctx); err != nil {
return nil
return err
}

if err := c.redfishwrapper.Open(ctx); err != nil {
Expand Down

0 comments on commit 90f2257

Please sign in to comment.