Thread (53 messages) 53 messages, 4 authors, 2019-11-22
STALE2437d
Revisions (2)
  1. v5 current
  2. v6 [diff vs current]

[PATCH v5 42/48] soc: fsl: qe: drop pointless check in qe_sdma_init()

From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: 2019-11-18 11:24:35
Also in: linux-arm-kernel, lkml
Subsystem: freescale quicc engine library, freescale soc drivers, the rest · Maintainers: Qiang Zhao, Christophe Leroy, Linus Torvalds

The sdma member of struct qe_immap is not at offset zero, so even if
qe_immr wasn't initialized yet (i.e. NULL), &qe_immr->sdma would not
be NULL.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/soc/fsl/qe/qe.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c
index 5bf279c679ef..96c2057d8d8e 100644
--- a/drivers/soc/fsl/qe/qe.c
+++ b/drivers/soc/fsl/qe/qe.c
@@ -367,9 +367,6 @@ static int qe_sdma_init(void)
 	struct sdma __iomem *sdma = &qe_immr->sdma;
 	static s32 sdma_buf_offset = -ENOMEM;
 
-	if (!sdma)
-		return -ENODEV;
-
 	/* allocate 2 internal temporary buffers (512 bytes size each) for
 	 * the SDMA */
 	if (sdma_buf_offset < 0) {
-- 
2.23.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help