diff --git a/drivers/char/random/src/random_hw.c b/drivers/char/random/src/random_hw.c index ffaa495a0bb52dfb7bef1977638e3cf81a67e1de..a290a5864573532a58fc3919bb26e10f415ba54f 100644 --- a/drivers/char/random/src/random_hw.c +++ b/drivers/char/random/src/random_hw.c @@ -65,7 +65,7 @@ static int RandomHwClose(struct file *filep) static int RandomHwIoctl(struct file *filep, int cmd, unsigned long arg) { - int ret; + int ret = -1; switch (cmd) { default: @@ -77,7 +77,7 @@ static int RandomHwIoctl(struct file *filep, int cmd, unsigned long arg) static ssize_t RandomHwRead(struct file *filep, char *buffer, size_t buflen) { - int ret; + int ret = -1; if (g_randomOp.read != NULL) { ret = g_randomOp.read(buffer, buflen);