maru: Remove useless null checks for array address 30/292930/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 15 May 2023 03:39:38 +0000 (12:39 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 17 May 2023 06:17:00 +0000 (15:17 +0900)
The array address is always not null, so no need to check. Remove
useless null checks to fix -Waddress build warnings.

Change-Id: I3bef4644e37d8ed4a2a88fb21408ac1b4ff7a64b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/maru/maru_jack.c
drivers/maru/maru_power_supply.c
drivers/maru/sensors/maru_virtio_sensor.c

index abfecf0ecf4c62d317bfbf6a96d95863ea6ff09e..7cc8c194eb0498238730fef4b9975569da32690f 100644 (file)
@@ -144,10 +144,6 @@ static void jack_vq_done(struct virtqueue *vq) {
                DLOG(KERN_DEBUG, "receive queue- not an answer message: %d", msg->req);
                return;
        }
-       if (msg->buf == NULL) {
-               DLOG(KERN_ERR, "receive queue- message from host is NULL.");
-               return;
-       }
 
        DLOG(KERN_DEBUG, "msg buf: %s, req: %d, type: %d", msg->buf, msg->req, msg->type);
 
index b9535136edc945844d1dd0ff6733336743ddeacf..0fb94652c9af4ecf37773aeb28088279a10b4c51 100644 (file)
@@ -120,10 +120,6 @@ static void power_vq_done(struct virtqueue *vq) {
                DLOG(KERN_DEBUG, "receive queue- not an answer message: %d", msg->req);
                return;
        }
-       if (msg->buf == NULL) {
-               DLOG(KERN_ERR, "receive queue- message from host is NULL.");
-               return;
-       }
 
        DLOG(KERN_DEBUG, "msg buf: %s, req: %d, type: %d", msg->buf, msg->req, msg->type);
 
index 33d6157f5192fc1d102cc9cf54a3f5d3e3149e80..60117c3dd69219516f46c7f02bd96dba6a0ab942 100644 (file)
@@ -160,11 +160,6 @@ static void sensor_vq_done(struct virtqueue *rvq) {
                return;
        }
 
-       if (msg->buf == NULL) {
-               ERR("receive queue- message from host is NULL.");
-               return;
-       }
-
        mutex_lock(&vs->lock);
        LOG(1, "msg buf: %s, req: %d, type: %d, vs->flags: %d", msg->buf, msg->req, msg->type, vs->flags);