Re: [PATCH 21/29] video: rework mode_name parameter setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fri, 14 Mar 2014 15:32:41 +0100 от Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>:
> 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 <s.hauer@xxxxxxxxxxxxxx>
> ---
...
> +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
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux