maru: Remove useless null checks for array address 99/292799/2 accepted/tizen/unified/20230531.034430 accepted/tizen/unified/dev/20230726.115325
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>
Mon, 15 May 2023 04:43:48 +0000 (13:43 +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 abfecf0..7cc8c19 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 b953513..0fb9465 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 33d6157..60117c3 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);