Message ID | 207ad99c-288a-0fca-677c-dcdc5334eb25@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index d6a0221..19611a2 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -297,19 +297,19 @@ static int vpbe_set_output(struct vpbe_device *vpbe_dev, int index) static int vpbe_set_default_output(struct vpbe_device *vpbe_dev) { struct vpbe_config *cfg = vpbe_dev->cfg; - int ret = 0; int i; for (i = 0; i < cfg->num_outputs; i++) { if (!strcmp(def_output, cfg->outputs[i].output.name)) { - ret = vpbe_set_output(vpbe_dev, i); + int ret = vpbe_set_output(vpbe_dev, i); + if (!ret) vpbe_dev->current_out_index = i; return ret; } } - return ret; + return 0; } /**