mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
rtase: Refine the if statement
Refine the if statement to improve readability. Signed-off-by: Justin Lai <justinlai0215@realtek.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20241206084851.760475-1-justinlai0215@realtek.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
72e2e2f5ee
commit
7ea2745766
|
|
@ -2018,7 +2018,7 @@ static int rtase_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
|||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
|
||||
ret = pci_enable_device(pdev);
|
||||
if (ret < 0)
|
||||
if (ret)
|
||||
goto err_out_free_dev;
|
||||
|
||||
/* make sure PCI base addr 1 is MMIO */
|
||||
|
|
@ -2034,7 +2034,7 @@ static int rtase_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
|||
}
|
||||
|
||||
ret = pci_request_regions(pdev, KBUILD_MODNAME);
|
||||
if (ret < 0)
|
||||
if (ret)
|
||||
goto err_out_disable;
|
||||
|
||||
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
|
|
@ -2110,7 +2110,7 @@ static int rtase_init_one(struct pci_dev *pdev,
|
|||
dev_dbg(&pdev->dev, "Automotive Switch Ethernet driver loaded\n");
|
||||
|
||||
ret = rtase_init_board(pdev, &dev, &ioaddr);
|
||||
if (ret != 0)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
tp = netdev_priv(dev);
|
||||
|
|
@ -2120,7 +2120,7 @@ static int rtase_init_one(struct pci_dev *pdev,
|
|||
|
||||
/* identify chip attached to board */
|
||||
ret = rtase_check_mac_version_valid(tp);
|
||||
if (ret != 0) {
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev,
|
||||
"unknown chip version: 0x%08x, contact rtase maintainers (see MAINTAINERS file)\n",
|
||||
tp->hw_ver);
|
||||
|
|
@ -2131,7 +2131,7 @@ static int rtase_init_one(struct pci_dev *pdev,
|
|||
rtase_init_hardware(tp);
|
||||
|
||||
ret = rtase_alloc_interrupt(pdev, tp);
|
||||
if (ret < 0) {
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "unable to alloc MSIX/MSI\n");
|
||||
goto err_out_del_napi;
|
||||
}
|
||||
|
|
@ -2176,7 +2176,7 @@ static int rtase_init_one(struct pci_dev *pdev,
|
|||
netif_carrier_off(dev);
|
||||
|
||||
ret = register_netdev(dev);
|
||||
if (ret != 0)
|
||||
if (ret)
|
||||
goto err_out_free_dma;
|
||||
|
||||
netdev_dbg(dev, "%pM, IRQ %d\n", dev->dev_addr, dev->irq);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user