Skip to content

Commit

Permalink
spi_bfin: remove useless fault path
Browse files Browse the repository at this point in the history
Remove useless return status check in restore_state function.  Issue was
pointed out by Michael.

Cc: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Bryan Wu authored and Linus Torvalds committed Feb 6, 2008
1 parent ccc7bae commit 8d20d0a
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,9 @@ static void cs_deactive(struct driver_data *drv_data, struct chip_data *chip)
#define MAX_SPI_SSEL 7

/* stop controller and re-config current chip*/
static int restore_state(struct driver_data *drv_data)
static void restore_state(struct driver_data *drv_data)
{
struct chip_data *chip = drv_data->cur_chip;
int ret = 0;

/* Clear status and disable clock */
write_STAT(drv_data, BIT_STAT_CLR);
Expand All @@ -239,13 +238,6 @@ static int restore_state(struct driver_data *drv_data)

bfin_spi_enable(drv_data);
cs_active(drv_data, chip);

if (ret)
dev_dbg(&drv_data->pdev->dev,
": request chip select number %d failed\n",
chip->chip_select_num);

return ret;
}

/* used to kick off transfer in rx mode */
Expand Down Expand Up @@ -978,10 +970,7 @@ static void pump_messages(struct work_struct *work)

/* Setup the SSP using the per chip configuration */
drv_data->cur_chip = spi_get_ctldata(drv_data->cur_msg->spi);
if (restore_state(drv_data)) {
spin_unlock_irqrestore(&drv_data->lock, flags);
return;
};
restore_state(drv_data);

list_del_init(&drv_data->cur_msg->queue);

Expand Down

0 comments on commit 8d20d0a

Please sign in to comment.