Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Adrian Hunter and committed by
Alexandre Belloni
d540d090 581d5b79

+3 -3
+3 -3
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
··· 229 229 goto err; 230 230 231 231 hci->info = (const struct mipi_i3c_hci_pci_info *)id->driver_data; 232 - if (hci->info && hci->info->init) { 232 + if (hci->info->init) { 233 233 ret = hci->info->init(hci); 234 234 if (ret) 235 235 goto err; ··· 244 244 return 0; 245 245 246 246 err_exit: 247 - if (hci->info && hci->info->exit) 247 + if (hci->info->exit) 248 248 hci->info->exit(hci); 249 249 err: 250 250 platform_device_put(hci->pdev); ··· 258 258 struct platform_device *pdev = hci->pdev; 259 259 int dev_id = pdev->id; 260 260 261 - if (hci->info && hci->info->exit) 261 + if (hci->info->exit) 262 262 hci->info->exit(hci); 263 263 264 264 platform_device_unregister(pdev);