Skip to content

Commit 27edd64

Browse files
committed
bsdkm: call wolfkdriv_unregister before wolfkmod_cleanup, and misc cleanup.
1 parent 62168d4 commit 27edd64

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

bsdkm/wolfkmod.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ static int wolfkdriv_attach(device_t dev)
492492
attach_out:
493493
if (error) {
494494
device_printf(dev, "error: attach_out: %d\n", error);
495-
(void)wolfkmod_cleanup();
496495
wolfkdriv_unregister(softc);
496+
(void)wolfkmod_cleanup();
497497
}
498498

499499
return (error);
@@ -506,8 +506,8 @@ static int wolfkdriv_detach(device_t dev)
506506

507507
/* unregister wolfcrypt algs */
508508
softc = device_get_softc(dev);
509-
ret = wolfkmod_cleanup();
510509
wolfkdriv_unregister(softc);
510+
ret = wolfkmod_cleanup();
511511
#if defined(WOLFSSL_BSDKM_VERBOSE_DEBUG)
512512
device_printf(dev, "info: exiting detach: %d\n", ret);
513513
#else

bsdkm/x86_vecreg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int wolfkmod_vecreg_save(int flags_unused)
140140
#endif
141141

142142
if (fpu_states == NULL) {
143-
printf("info : wolfkmod_vecreg_save: fpu_states null\n");
143+
printf("error: wolfkmod_vecreg_save: fpu_states null\n");
144144
return (EINVAL);
145145
}
146146

@@ -195,7 +195,7 @@ void wolfkmod_vecreg_restore(void)
195195
#endif
196196

197197
if (fpu_states == NULL) {
198-
printf("info: wolfkmod_vecreg_restore: fpu_states null\n");
198+
printf("error: wolfkmod_vecreg_restore: fpu_states null\n");
199199
return;
200200
}
201201

0 commit comments

Comments
 (0)