Commit 48acf829 authored by Rand Deeb's avatar Rand Deeb Committed by Andi Shyti
Browse files

i2c: Remove redundant comparison in npcm_i2c_reg_slave



In the npcm_i2c_reg_slave() function, there was a redundant
comparison that checked if 'bus->slave' was null immediately after
assigning it the 'client' value. There were concerns about a
potential null dereference because of `client->adapter`, but
according to Wolfram Sang, "we trusted ourselves here" Therefore,
this comparison is unnecessary.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: default avatarRand Deeb <rand.sec96@gmail.com>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent 857cc04c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment