mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-25 11:55:37 +00:00
platform/mellanox: Remove redundant 'NULL' check
Remove 'NULL' check for 'data->hpdev.client' in error flow of
mlxreg_lc_probe(). It cannot be 'NULL' at this point.
Fixes: b4b830a34d
("platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20220823201937.46855-5-vadimp@nvidia.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
1c8ee06b63
commit
059209fd90
1 changed files with 2 additions and 4 deletions
|
@ -893,10 +893,8 @@ static int mlxreg_lc_probe(struct platform_device *pdev)
|
|||
regcache_sync_fail:
|
||||
regmap_write_fail:
|
||||
devm_regmap_init_i2c_fail:
|
||||
if (data->hpdev.client) {
|
||||
i2c_unregister_device(data->hpdev.client);
|
||||
data->hpdev.client = NULL;
|
||||
}
|
||||
i2c_unregister_device(data->hpdev.client);
|
||||
data->hpdev.client = NULL;
|
||||
i2c_new_device_fail:
|
||||
i2c_put_adapter(data->hpdev.adapter);
|
||||
data->hpdev.adapter = NULL;
|
||||
|
|
Loading…
Reference in a new issue