lkml.org 
[lkml]   [2017]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/3] rtc: rx8010: Fix for incorrect return value
On Tue, Nov 7, 2017 at 9:30 PM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> On 03/11/2017 at 13:32:41 -0400, Akshay Bhat wrote:
>> if (err != 2)
>> return err < 0 ? err : -EIO;
>> + err = 0;
>
> Isn't it simpler to make the function return 0 instead of err at the end?

Makes sense, fixed in v2 patch, thanks.

\
 
 \ /
  Last update: 2017-11-08 21:15    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog