Skip to content

Commit

Permalink
pata_pdc2027x: Remove unnecessary error check
Browse files Browse the repository at this point in the history
Here, The function pdc_hardware_init always return zero. So it is not
necessary to check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Arvind Yadav authored and Tejun Heo committed Nov 27, 2017
1 parent 16a27df commit c1da86c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/ata/pata_pdc2027x.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ static long pdc_detect_pll_input_clock(struct ata_host *host)
* @host: target ATA host
* @board_idx: board identifier
*/
static int pdc_hardware_init(struct ata_host *host, unsigned int board_idx)
static void pdc_hardware_init(struct ata_host *host, unsigned int board_idx)
{
long pll_clock;

Expand All @@ -665,8 +665,6 @@ static int pdc_hardware_init(struct ata_host *host, unsigned int board_idx)

/* Adjust PLL control register */
pdc_adjust_pll(host, pll_clock, board_idx);

return 0;
}

/**
Expand Down Expand Up @@ -753,8 +751,7 @@ static int pdc2027x_init_one(struct pci_dev *pdev,
//pci_enable_intx(pdev);

/* initialize adapter */
if (pdc_hardware_init(host, board_idx) != 0)
return -EIO;
pdc_hardware_init(host, board_idx);

pci_set_master(pdev);
return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
Expand All @@ -778,8 +775,7 @@ static int pdc2027x_reinit_one(struct pci_dev *pdev)
else
board_idx = PDC_UDMA_133;

if (pdc_hardware_init(host, board_idx))
return -EIO;
pdc_hardware_init(host, board_idx);

ata_host_resume(host);
return 0;
Expand Down

0 comments on commit c1da86c

Please sign in to comment.