mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-28 08:35:38 +00:00
boot: simplify bootmeth_vbe_simple_ft_fixup()
Don't assign a value to a variable if it is not used afterwards. Move variables to the code fragment where they are used. Addresses-Coverity: CID 356243 ("Code maintainability issues (UNUSED_VALUE)") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d81eeacd48
commit
49740e0255
1 changed files with 3 additions and 4 deletions
|
@ -225,17 +225,16 @@ static int bootmeth_vbe_simple_ft_fixup(void *ctx, struct event *event)
|
||||||
{
|
{
|
||||||
oftree tree = event->data.ft_fixup.tree;
|
oftree tree = event->data.ft_fixup.tree;
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
ofnode node;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ideally we would have driver model support for fixups, but that does
|
* Ideally we would have driver model support for fixups, but that does
|
||||||
* not exist yet. It is a step too far to try to do this before VBE is
|
* not exist yet. It is a step too far to try to do this before VBE is
|
||||||
* in place.
|
* in place.
|
||||||
*/
|
*/
|
||||||
for (ret = vbe_find_first_device(&dev); dev;
|
for (vbe_find_first_device(&dev); dev; vbe_find_next_device(&dev)) {
|
||||||
ret = vbe_find_next_device(&dev)) {
|
|
||||||
struct simple_state state;
|
struct simple_state state;
|
||||||
|
ofnode node;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (strcmp("vbe_simple", dev->driver->name))
|
if (strcmp("vbe_simple", dev->driver->name))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue