kobolabs / Kobo-Reader

http://www.koboereader.com/
598 stars 126 forks source link

Kobo Clara HD epd suspend trouble-> unitialized variable #93

Closed akemnade closed 2 years ago

akemnade commented 4 years ago

I have seen the device not going into suspend serveral times and found out that there is an unitialized variable in static int mxc_epdc_fb_suspend(struct device *dev) { int ret;

if EPD_SUSPEND_BLANK is not defined, nothing will be assigned to "ret" and happily returned that value. Often that is zero but not always.

If things fail, dmesg shows errors like PM: Device 20f4000.epdc failed to suspend: error -2144504356

A simple diff --git a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c index 7d89c676..28216ef0 100644 --- a/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c +++ b/drivers/video/fbdev/mxc/mxc_epdc_v2_fb.c @@ -7881,7 +7881,7 @@ static int mxc_epdc_fb_remove(struct platform_device pdev) static int mxc_epdc_fb_suspend(struct device dev) { struct mxc_epdc_fb_data *data = dev_get_drvdata(dev);

improves things. But since the kernel is just a tarball here, I cannot create a pull request. I am referring to the kernel at https://github.com/kobolabs/Kobo-Reader/blob/master/hw/imx6sll-clara/kernel.tar.bz2

akemnade commented 2 years ago

hmm, seems to be fixed in the newest sources, didn't notice and would expect some comment here.