Skip to content

Commit

Permalink
spi: Delete useless checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhang jiao authored and Mark Brown committed Nov 12, 2024
1 parent c6d0529 commit b1e7828
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b1e7828

Please sign in to comment.