staging: tidspbridge: fix kernel oops in bridge_io_get_proc_load
authorIonut Nicu <ionut.nicu@gmail.com>
Fri, 5 Nov 2010 17:01:50 +0000 (17:01 +0000)
committerOmar Ramirez Luna <omar.ramirez@ti.com>
Sat, 5 Feb 2011 02:11:24 +0000 (20:11 -0600)
commit74c2d1f63f6fff26503f538ddacf0e45feb15f0d
treedccf4dc5836c0293548c837faa2123d37b422ff4
parent59403c21afdcd2e89aeadc73b99ccd82d32733b3
staging: tidspbridge: fix kernel oops in bridge_io_get_proc_load

The DSP shared memory area gets initialized only when
a COFF file is loaded.

If bridge_io_get_proc_load is called before loading a base
image into the DSP, the shared_mem member of the io manager
will be NULL, resulting in a kernel oops when it's dereferenced.

Also made some coding style changes to bridge_io_create.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
drivers/staging/tidspbridge/core/io_sm.c