]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mailbox: k3: Fix not calling dev_err with a device
authorSean Anderson <seanga2@gmail.com>
Tue, 15 Sep 2020 14:44:48 +0000 (10:44 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 12:52:54 +0000 (08:52 -0400)
dev needs to be gotten from mbox_chan

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/mailbox/k3-sec-proxy.c

index 3f9afaed3286cb1e433b3f158409f472d2b728f8..27ccc6eab060649de893960978d2d3604925e138 100644 (file)
@@ -212,14 +212,16 @@ static int k3_sec_proxy_send(struct mbox_chan *chan, const void *data)
 
        ret = k3_sec_proxy_verify_thread(spt, THREAD_IS_TX);
        if (ret) {
-               dev_err(dev, "%s: Thread%d verification failed. ret = %d\n",
+               dev_err(chan->dev,
+                       "%s: Thread%d verification failed. ret = %d\n",
                        __func__, spt->id, ret);
                return ret;
        }
 
        /* Check the message size. */
        if (msg->len > spm->desc->max_msg_size) {
-               printf("%s: Thread %ld message length %zu > max msg size %d\n",
+               dev_err(chan->dev,
+                       "%s: Thread %ld message length %zu > max msg size %d\n",
                       __func__, chan->id, msg->len, spm->desc->max_msg_size);
                return -EINVAL;
        }