Merge tag 'iommu-fixes-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
[deliverable/linux.git] / drivers / mailbox / omap-mailbox.c
index 0f332c178b07a049d3153887b57643659ed2487b..a3dbfd9c647994ec6794701cfc25a327739640ad 100644 (file)
@@ -604,7 +604,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
        return ret;
 }
 
-static struct mbox_chan_ops omap_mbox_chan_ops = {
+static const struct mbox_chan_ops omap_mbox_chan_ops = {
        .startup        = omap_mbox_chan_startup,
        .send_data      = omap_mbox_chan_send_data,
        .shutdown       = omap_mbox_chan_shutdown,
@@ -639,18 +639,18 @@ static struct mbox_chan *omap_mbox_of_xlate(struct mbox_controller *controller,
 
        mdev = container_of(controller, struct omap_mbox_device, controller);
        if (WARN_ON(!mdev))
-               return NULL;
+               return ERR_PTR(-EINVAL);
 
        node = of_find_node_by_phandle(phandle);
        if (!node) {
                pr_err("%s: could not find node phandle 0x%x\n",
                       __func__, phandle);
-               return NULL;
+               return ERR_PTR(-ENODEV);
        }
 
        mbox = omap_mbox_device_find(mdev, node->name);
        of_node_put(node);
-       return mbox ? mbox->chan : NULL;
+       return mbox ? mbox->chan : ERR_PTR(-ENOENT);
 }
 
 static int omap_mbox_probe(struct platform_device *pdev)
This page took 0.030652 seconds and 5 git commands to generate.