devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kbuild-all-JC7UmRfGjtg@public.gmane.org,
	Matt Mackall <mpm-VDJrAJ4Gl5ZBDgjK7y7TUQ@public.gmane.org>,
	Herbert Xu
	<herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>,
	Daniel Thompson
	<daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org,
	Maxime Coquelin
	<mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: [PATCH] hwrng: fix simple_return.cocci warnings
Date: Sun, 4 Oct 2015 05:02:30 +0800	[thread overview]
Message-ID: <20151003210230.GA71026@lkp-hsx03> (raw)
In-Reply-To: <1443904519-24012-3-git-send-email-daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

drivers/char/hw_random/stm32-rng.c:164:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.

Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Daniel Thompson <daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

 stm32-rng.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/char/hw_random/stm32-rng.c
+++ b/drivers/char/hw_random/stm32-rng.c
@@ -161,11 +161,7 @@ static int stm32_rng_probe(struct platfo
 	priv->rng.read = stm32_rng_read,
 	priv->rng.priv = (unsigned long) dev;
 
-	err = hwrng_register(&priv->rng);
-	if (err)
-		return err;
-
-	return 0;
+	return hwrng_register(&priv->rng);
 }
 
 static const struct of_device_id stm32_rng_match[] = {
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-10-03 21:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 20:35 [PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
     [not found] ` <1443904519-24012-1-git-send-email-daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-03 20:35   ` [PATCH 1/3] dt-bindings: Document the STM32 HW RNG bindings Daniel Thompson
2015-10-04  8:27     ` Maxime Coquelin
2015-10-05 15:34     ` Rob Herring
2015-10-03 20:35   ` [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
     [not found]     ` <1443904519-24012-3-git-send-email-daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-03 21:02       ` kbuild test robot [this message]
2015-10-03 21:02       ` kbuild test robot
2015-10-04 10:32       ` Linus Walleij
2015-10-05  9:22         ` Daniel Thompson
     [not found]           ` <CAMTL27G9j8tR4WKQgj6HbVCTd-5Xx0HYs40Rij91GgT4D8PevA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-11 19:15             ` Daniel Thompson
2015-10-11 19:24           ` Daniel Thompson
2015-10-04  8:52     ` Maxime Coquelin
2015-10-05  9:26       ` Daniel Thompson
2015-10-03 20:35   ` [PATCH 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver Daniel Thompson
     [not found]     ` <1443904519-24012-4-git-send-email-daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-04  9:09       ` Maxime Coquelin
2015-10-12  8:21 ` [PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-12  8:21   ` [PATCH 1/3] dt-bindings: Document the STM32 HW RNG bindings Daniel Thompson
     [not found]   ` <1444638090-22886-1-git-send-email-daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-12  8:21     ` [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-14  7:39       ` Linus Walleij
2015-10-12  8:21   ` [PATCH 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver Daniel Thompson
2015-10-14 14:28   ` [PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG Herbert Xu
     [not found]     ` <20151014142822.GF17455-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2015-10-14 14:46       ` Maxime Coquelin
2015-10-14 15:55 ` [PATCH v3 " Daniel Thompson
2015-10-14 15:55   ` [PATCH v3 1/3] dt-bindings: Document the STM32 HW RNG bindings Daniel Thompson
2015-10-14 15:55   ` [PATCH v3 2/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-14 15:55   ` [PATCH v3 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver Daniel Thompson
2015-10-14 16:04 ` [PATCH] hwrng: stm32 - Fix build with CONFIG_PM Daniel Thompson
2015-10-15  2:00   ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151003210230.GA71026@lkp-hsx03 \
    --to=lkp-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=kbuild-all-JC7UmRfGjtg@public.gmane.org \
    --cc=linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=mpm-VDJrAJ4Gl5ZBDgjK7y7TUQ@public.gmane.org \
    --cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).