Fix IPTS error on device release

This commit is contained in:
Jake Day 2017-08-10 13:56:11 -04:00
parent c4e3986dce
commit dc062fd717
2 changed files with 4 additions and 3 deletions

View file

@ -286,8 +286,9 @@ err_dev:
void ipts_hid_release(ipts_info_t *ipts)
{
struct hid_device *hid = ipts->hid;
hid_destroy_device(hid);
if (!ipts->hid)
return;
hid_destroy_device(ipts->hid);
}
int ipts_handle_hid_data(ipts_info_t *ipts,

View file

@ -26,7 +26,7 @@
#include "ipts-state.h"
#include "ipts-binary-spec.h"
//#define ENABLE_IPTS_DEBUG /* enable IPTS debug */
#define ENABLE_IPTS_DEBUG /* enable IPTS debug */
#ifdef ENABLE_IPTS_DEBUG