Skip to content

Commit b1e7828

Browse files
zhang jiaobroonie
authored andcommitted
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>
1 parent c6d0529 commit b1e7828

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/spi/spi.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -984,9 +984,6 @@ static void spi_res_free(void *res)
984984
{
985985
struct spi_res *sres = container_of(res, struct spi_res, data);
986986

987-
if (!res)
988-
return;
989-
990987
WARN_ON(!list_empty(&sres->entry));
991988
kfree(sres);
992989
}

0 commit comments

Comments
 (0)