mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
dm: platform: clean up assert() for some platform devices
Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -35,6 +34,7 @@
|
||||
#include "types.h"
|
||||
#include "atkbdc.h"
|
||||
#include "console.h"
|
||||
#include "log.h"
|
||||
|
||||
/* keyboard device commands */
|
||||
#define PS2KC_RESET_DEV 0xff
|
||||
@@ -225,8 +225,6 @@ ps2kbd_keysym_queue(struct ps2kbd_info *kbd,
|
||||
0x22, 0x35, 0x1a, 0x54, 0x5d, 0x5b, 0x0e, 0x00,
|
||||
};
|
||||
|
||||
/* assert(pthread_mutex_isowned_np(&kbd->mtx)); */
|
||||
|
||||
switch (keysym) {
|
||||
case 0x0 ... 0x7f:
|
||||
if (!down)
|
||||
@@ -462,8 +460,10 @@ ps2kbd_init(struct atkbdc_base *base)
|
||||
struct ps2kbd_info *kbd;
|
||||
|
||||
kbd = calloc(1, sizeof(struct ps2kbd_info));
|
||||
|
||||
assert(kbd != NULL);
|
||||
if (!kbd) {
|
||||
pr_err("%s: alloc memory fail!\n", __func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pthread_mutex_init(&kbd->mtx, NULL);
|
||||
fifo_init(kbd);
|
||||
|
||||
Reference in New Issue
Block a user