summaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/core/memstick.c21
-rw-r--r--drivers/memstick/core/mspro_block.c3
-rw-r--r--drivers/memstick/host/r592.c6
3 files changed, 16 insertions, 14 deletions
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index 12bc3f5a6cbb..bb1065990aeb 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -331,18 +331,17 @@ static int h_memstick_read_dev_id(struct memstick_dev *card,
sizeof(struct ms_id_register));
*mrq = &card->current_mrq;
return 0;
- } else {
- if (!(*mrq)->error) {
- memcpy(&id_reg, (*mrq)->data, sizeof(id_reg));
- card->id.match_flags = MEMSTICK_MATCH_ALL;
- card->id.type = id_reg.type;
- card->id.category = id_reg.category;
- card->id.class = id_reg.class;
- dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
- }
- complete(&card->mrq_complete);
- return -EAGAIN;
}
+ if (!(*mrq)->error) {
+ memcpy(&id_reg, (*mrq)->data, sizeof(id_reg));
+ card->id.match_flags = MEMSTICK_MATCH_ALL;
+ card->id.type = id_reg.type;
+ card->id.category = id_reg.category;
+ card->id.class = id_reg.class;
+ dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
+ }
+ complete(&card->mrq_complete);
+ return -EAGAIN;
}
static int h_memstick_set_rw_addr(struct memstick_dev *card,
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index afb892e7ffc6..cf7fe0d58ee7 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -1382,7 +1382,8 @@ static int mspro_block_resume(struct memstick_dev *card)
new_msb->card = card;
memstick_set_drvdata(card, new_msb);
- if (mspro_block_init_card(card))
+ rc = mspro_block_init_card(card);
+ if (rc)
goto out_free;
for (cnt = 0; new_msb->attr_group.attrs[cnt]
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
index d2ef46337191..615a83782e55 100644
--- a/drivers/memstick/host/r592.c
+++ b/drivers/memstick/host/r592.c
@@ -359,13 +359,15 @@ static void r592_write_fifo_pio(struct r592_device *dev,
/* Flushes the temporary FIFO used to make aligned DWORD writes */
static void r592_flush_fifo_write(struct r592_device *dev)
{
+ int ret;
u8 buffer[4] = { 0 };
- int len;
if (kfifo_is_empty(&dev->pio_fifo))
return;
- len = kfifo_out(&dev->pio_fifo, buffer, 4);
+ ret = kfifo_out(&dev->pio_fifo, buffer, 4);
+ /* intentionally ignore __must_check return code */
+ (void)ret;
r592_write_reg_raw_be(dev, R592_FIFO_PIO, *(u32 *)buffer);
}