Skip to content

Commit 13b5a9e

Browse files
ColinIanKingsre
authored andcommitted
power: supply: rk817: remove redundant null check on node
The pointer null is being null checked immediately after it has been assigned at the start of the function and not changed afterwards. The subsequent null check on node is redudant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20250319105153.775155-1-colin.i.king@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 0af2f6b commit 13b5a9e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/power/supply/rk817_charger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ static int rk817_charger_probe(struct platform_device *pdev)
10881088
rk817_bat_calib_vol(charger);
10891089

10901090
pscfg.drv_data = charger;
1091-
pscfg.fwnode = node ? &node->fwnode : NULL;
1091+
pscfg.fwnode = &node->fwnode;
10921092

10931093
/*
10941094
* Get sample resistor value. Note only values of 10000 or 20000

0 commit comments

Comments
 (0)