Fix the way the create endpoint function returns the address number when RPMSG_ADDR_A...
authorMichal Princ (NXA17570) <michal.princ@nxp.com>
Thu, 18 Feb 2016 07:12:08 +0000 (08:12 +0100)
committerWendy Liang <jliang@xilinx.com>
Thu, 18 Feb 2016 21:26:15 +0000 (13:26 -0800)
commit210685ca8e1e60e2bcc70f3951d38667fbb5daa7
tree09d05b6abd68f87800d26c1e5bb6a3222a4cd560
parent011e86d62b4cd6afb2ad6394159c0d598c8c99bc
Fix the way the create endpoint function returns the address number when RPMSG_ADDR_ANY is passed the parameter

This bug has been revealed when performing following steps:
1. create one endpoint with address RPMSG_ADDR_ANY.
2. get the address of that endpoint after it is created successfully.
3. use that address to create another endpoint.
It should not create the second endpoint with address of the first endpoint but somehow both endpoints were created successfully.

Restrict the endpoint address - zero address can't be assigned (due to the conflict in Linux world)

Signed-off-by: Michal Princ (NXA17570) <michal.princ@nxp.com>
lib/rpmsg/remote_device.c
lib/rpmsg/rpmsg_core.c