It returns false if device is not initialized.
Change-Id: I1e96d6ebb9e14b11217232c129598767394ffd5e
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
VirtIOEVDI* vio_evdi;
-
//
typedef struct MsgInfo
int count = 0;
char* readptr = data;
+ if(vio_evdi == NULL) {
+ ERR("EVDI is not initialized\n");
+ return false;
+ }
+
if (unlikely(!virtio_queue_ready(vio_evdi->rvq))) {
ERR("virtio queue is not ready\n");
return false;
bool send_to_nfc(unsigned char id, unsigned char type, const char* data, const uint32_t len)
{
+ if(vio_nfc == NULL) {
+ ERR("NFC is not initialized\n");
+ return false;
+ }
+
if (unlikely(!virtio_queue_ready(vio_nfc->rvq))) {
ERR("virtio queue is not ready\n");
return false;