Properly log a dev_err() message when the msgid is not of VCHIQ_MSG_PADDING type. Drop 'oldmsgid' scoped variable and improve on the error string as well. Signed-off-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx> --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index e9b60dd8d419..1dca676186b6 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1188,13 +1188,10 @@ queue_message_sync(struct vchiq_state *state, struct vchiq_service *service, header = (struct vchiq_header *)SLOT_DATA_FROM_INDEX(state, local->slot_sync); - { - int oldmsgid = header->msgid; - - if (oldmsgid != VCHIQ_MSGID_PADDING) - dev_err(state->dev, "core: %d: qms - msgid %x, not PADDING\n", - state->id, oldmsgid); - } + if (header->msgid != VCHIQ_MSGID_PADDING) + dev_err(state->dev, + "core: %d: qms - msgid %x, is not a PADDING message\n", + state->id, header->msgid); dev_dbg(state->dev, "sync: %d: qms %s@%pK,%x (%d->%d)\n", state->id, msg_type_str(VCHIQ_MSG_TYPE(msgid)), header, size, -- 2.45.2