[PATCH V3 04/11] i3c: mipi-i3c-hci-pci: Do not repeatedly check for NULL driver_data

Adrian Hunter
2025-12-16T16:57:04Z

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>
---

Changes in V3:

Add Frank's Rev'd-by

Changes in V2:

Drop default driver data

drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 6 +++---
1 file 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);