Re: [PATCH 1/1] PM / Hibernate: fix error handling in save_image

From: Pavel Machek
Date: Sat Oct 10 2009 - 08:19:15 EST


On Sat 2009-10-10 13:51:45, Jiri Slaby wrote:
> There are too many retval variables in save_image. Thus error return
> value from snapshot_read_next may be ignored and only part of the
> snapshot (successfully) written.
>
> Remove 'error' variable, invert the condition in the do-while loop
> and convert the loop to use only 'ret' variable.
>
> Switch the rest of the function to consider only 'ret'.
>
> Also make sure we end printed line by \n if an error occurs.
>
> Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx>

ACK.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/