staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial cleanup
authorIvan Gomez Castellanos <ivan.gomez@ti.com>
Wed, 25 Aug 2010 22:08:58 +0000 (17:08 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 18:23:15 +0000 (11:23 -0700)
commite8184e6c2d32eb4418f6084155ac1ffb08c751e8
treeb22a075c9f18ca95684161cc4bf049eb76cdf722
parent345c8bec42d7c55f98167da596ea5ca5f53d9f7d
staging: tidspbridge: Remove cfg_get_dev_object() and do a trivial cleanup

The cfg_get_dev_object function is only used in one place and because of
its simplicity, it can be removed.

The parameter *value can be left uninitialized if the strcmp() returns a
nonzero value, so in the function dev_remove_device(), the hdev_obj could
be used uninitialized and could be dereferenced in dev_destroy_device().
This patch fixes this issue, and also removes the dev_obj pointer which
is not used.

Signed-off-by: Ivan Gomez Castellanos <ivan.gomez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/tidspbridge/include/dspbridge/cfg.h
drivers/staging/tidspbridge/pmgr/dev.c
drivers/staging/tidspbridge/services/cfg.c