Re: [PATCH] firmware: (memconsole) do not count numbers if read fails

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Dec 25, 2018 at 11:29:11PM -0600, Kangjie Lu wrote: > When memory_read_from_buffer() fails, the return value is a negative > error code, thus we shouldn't count it as the number of read bytes. > > The fix checks the return value of memory_read_from_buffer, and count > the number only when

[PATCH] firmware: (memconsole) do not count numbers if read fails

2018-12-25 Thread Kangjie Lu
When memory_read_from_buffer() fails, the return value is a negative error code, thus we shouldn't count it as the number of read bytes. The fix checks the return value of memory_read_from_buffer, and count the number only when it succeeds. Signed-off-by: Kangjie Lu ---