dfu: dfu_sf: Pass duplicate devstr to parse_dev
authorVignesh R <vigneshr@ti.com>
Tue, 20 Oct 2015 09:52:00 +0000 (15:22 +0530)
committerMarek Vasut <marex@denx.de>
Tue, 3 Nov 2015 16:29:33 +0000 (17:29 +0100)
commit30e3ea4c79dd35e97d04546bd39e2468c8ba63ef
treeaaf21a0fe2ef03fab34db72f79eaa30e58e6058d
parentb748b24fb504b4da630c6464d6704ae7758f3732
dfu: dfu_sf: Pass duplicate devstr to parse_dev

parse_dev() alters the string pointed by devstr parameter. Due to this
subsequent parsing of sf entities will fail, as string pointed by devstr
is no longer valid sf dev arguments.
Fix this by passing pointer to the copy of the string to parse_dev
instead of pointer to the actual devstr.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/dfu/dfu_sf.c