Skip to content

Commit

Permalink
usbdrivers, trivial: fix free error check
Browse files Browse the repository at this point in the history
ps_free will always return 0. Therefore, the error check was always
triggering, causing a ZF_LOGF statement to trigger.

Signed-off-by: Chris Guikema <[email protected]>
  • Loading branch information
chrisguikema committed Sep 17, 2024
1 parent 1e7f0b6 commit 8c9c7d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libusbdrivers/src/services.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static inline void usb_free(void *ptr)

if (ps_malloc_ops && ps_malloc_ops->free) {
ret = ps_free(ps_malloc_ops, 1, ptr);
if (!ret) {
if (ret) {
ZF_LOGF("Free error\n");
}
} else {
Expand Down

0 comments on commit 8c9c7d0

Please sign in to comment.