Skip to content

Commit

Permalink
Handle non-existent cards
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Aug 25, 2023
1 parent f03d24b commit ed607b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package main

import (
"errors"
"log"

"github.com/usbarmory/tamago/soc/nxp/imx6ul"
Expand All @@ -32,6 +33,9 @@ func init() {
}

func detect(card *usdhc.USDHC) (err error) {
if card == nil {
return errors.New("no such device")
}
err = card.Detect()

if err != nil {
Expand Down

0 comments on commit ed607b8

Please sign in to comment.