Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1660646 > unrolled thread

Re: [PATCH] rtc: rtc-max8925: remove redundant check on ret

Started byAndy Shevchenko <andy.shevchenko@gmail.com>
First post2017-06-08 03:40 +0200
Last post2017-06-08 03:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] rtc: rtc-max8925: remove redundant check on ret Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 03:40 +0200

#1660646 — Re: [PATCH] rtc: rtc-max8925: remove redundant check on ret

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2017-06-08 03:40 +0200
SubjectRe: [PATCH] rtc: rtc-max8925: remove redundant check on ret
Message-ID<tPUAx-61U-1@gated-at.bofh.it>
On Wed, Jun 7, 2017 at 6:26 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web