diff options
| author | Adrian Hunter <adrian.hunter@intel.com> | 2026-01-06 18:44:09 +0200 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2026-01-14 15:53:33 +0100 |
| commit | d540d090be8fd2be2dc2b1e0b2818a4a48abcc3e (patch) | |
| tree | 2398d73e0d4d015e1d5c2634779fb7353db4e446 | |
| parent | 581d5b7953b8f24d2f379c8c56ceaa7d163488ce (diff) | |
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>
| -rw-r--r-- | drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c index dc8ede0f8ad8..8ade911e3835 100644 --- a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +++ b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c @@ -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); |
