mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
i3c: mipi-i3c-hci-pci: Do not repeatedly check for NULL driver_data
All entries in the id_table have driver_data. Do not repeatedly check for NULL driver_data. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260106164416.67074-5-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
581d5b7953
commit
d540d090be
|
|
@ -229,7 +229,7 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
|
|||
goto err;
|
||||
|
||||
hci->info = (const struct mipi_i3c_hci_pci_info *)id->driver_data;
|
||||
if (hci->info && hci->info->init) {
|
||||
if (hci->info->init) {
|
||||
ret = hci->info->init(hci);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
|
@ -244,7 +244,7 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
|
|||
return 0;
|
||||
|
||||
err_exit:
|
||||
if (hci->info && hci->info->exit)
|
||||
if (hci->info->exit)
|
||||
hci->info->exit(hci);
|
||||
err:
|
||||
platform_device_put(hci->pdev);
|
||||
|
|
@ -258,7 +258,7 @@ static void mipi_i3c_hci_pci_remove(struct pci_dev *pci)
|
|||
struct platform_device *pdev = hci->pdev;
|
||||
int dev_id = pdev->id;
|
||||
|
||||
if (hci->info && hci->info->exit)
|
||||
if (hci->info->exit)
|
||||
hci->info->exit(hci);
|
||||
|
||||
platform_device_unregister(pdev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user