Fri, 14 Mar 2014 15:32:41 +0100 от Sascha Hauer <[email protected]>:
> We have dev_add_param_enum() now, so use it for the mode_name
> setting. Also drop the special case for single mode framebuffers,
> just add the mode_name parameter for this case aswell.
> 
> Signed-off-by: Sascha Hauer <[email protected]>
> ---
...
> +static int fb_setup_mode(struct fb_info *info)
> +{
> +     struct device_d *dev = &info->dev;
> +     int ret;
...
> -     ret = info->fbops->fb_activate_var(info);
> +     if (info->fbops->fb_activate_var) {
> +             ret = info->fbops->fb_activate_var(info);
> +             if (ret)
> +                     return ret;
> +     }

So, "ret" is unitialized without fb_activate_var().
It is wrong since this variable is used in code below.

        if (!ret) {
                dev->resource[0].start = (resource_size_t)info->screen_base;
                info->cdev.size = info->line_length * info->yres;
                dev->resource[0].end = dev->resource[0].start + info->cdev.size 
- 1;
        } else
                info->cdev.size = 0;

---

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to