summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>2024-11-12 16:16:37 +0800
committerMark Brown <broonie@kernel.org>2024-11-12 13:08:39 +0000
commitb1e7828cf9343e1da6c575f3ebaa0f511d8b8cbd (patch)
tree6033863cb72f465a8a68892420a2c40fa52dfb1c
parentc6d0529fb70c14e3ea67ac70211ed4359bbac99d (diff)
downloadlinux-stable-b1e7828cf9343e1da6c575f3ebaa0f511d8b8cbd.tar.gz
linux-stable-b1e7828cf9343e1da6c575f3ebaa0f511d8b8cbd.tar.bz2
linux-stable-b1e7828cf9343e1da6c575f3ebaa0f511d8b8cbd.zip
spi: Delete useless checks
Since "res" will never be null, just delete this check. Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com> Link: https://patch.msgid.link/20241112081637.40962-1-zhangjiao2@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 74e04a4b0f19..460a49d9a0de 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -984,9 +984,6 @@ static void spi_res_free(void *res)
{
struct spi_res *sres = container_of(res, struct spi_res, data);
- if (!res)
- return;
-
WARN_ON(!list_empty(&sres->entry));
kfree(sres);
}