[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfBLQjtZPgY9pDxu4Lp__u+E+bfS=A6-id9cpPCX_ZQoQ@mail.gmail.com>
Date: Thu, 8 Jun 2017 04:37:52 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Colin King <colin.king@...onical.com>
Cc: Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
linux-rtc@...r.kernel.org, kernel-janitors@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rtc: rtc-max8925: remove redundant check on ret
On Wed, Jun 7, 2017 at 6:26 PM, Colin King <colin.king@...onical.com> wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The check on ret < 0 is redundant as the goto destination is the
> next statment. Remove this redudant check and goto.
>
> Detected by CoverityScan, CID#1268785 ("Identical code for different
> branches")
> ret = max8925_reg_write(info->rtc, MAX8925_ALARM0_CNTL, 0x77);
> else
> ret = max8925_reg_write(info->rtc, MAX8925_ALARM0_CNTL, 0x0);
> - if (ret < 0)
> - goto out;
> out:
> return ret;
...and label (w/ replacing it by inplace return ret;) ?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists