From 3654d96e07f63e041f750aafd125c2c8bca27aa5 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 23 May 2021 14:11:12 +0700 Subject: only invoke tuh_msc_umount_cb() if needed --- src/class/hid/hid_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/class/hid') diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c index e3ae5a155..1bc86e4ad 100644 --- a/src/class/hid/hid_host.c +++ b/src/class/hid/hid_host.c @@ -241,7 +241,7 @@ void hidh_close(uint8_t dev_addr) hidh_device_t* hid_dev = get_dev(dev_addr); if (tuh_hid_umount_cb) { - for ( uint8_t inst = 0; inst < hid_dev->inst_count; inst++) tuh_hid_umount_cb(dev_addr, inst); + for ( uint8_t inst = 0; inst < hid_dev->inst_count; inst++ ) tuh_hid_umount_cb(dev_addr, inst); } tu_memclr(hid_dev, sizeof(hidh_device_t)); -- cgit v1.3.1