Commit 42e252a6 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: move initialization of pointer

This patch makes function store_add_link initialize the pointer to an AIM
right before the channel is probed. It is needed, the AIM may already call
most_start_channel while probe_channel is still running. At this point the
pointer to the AIM must not be NULL.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 44fe5781
...@@ -996,11 +996,14 @@ static ssize_t store_add_link(struct most_aim_obj *aim_obj, ...@@ -996,11 +996,14 @@ static ssize_t store_add_link(struct most_aim_obj *aim_obj,
else else
return -ENOSPC; return -ENOSPC;
*aim_ptr = aim_obj->driver;
ret = aim_obj->driver->probe_channel(c->iface, c->channel_id, ret = aim_obj->driver->probe_channel(c->iface, c->channel_id,
&c->cfg, &c->kobj, mdev_devnod); &c->cfg, &c->kobj, mdev_devnod);
if (ret) if (ret) {
*aim_ptr = NULL;
return ret; return ret;
*aim_ptr = aim_obj->driver; }
return len; return len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment