Commit 940da353 authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Torvalds
Browse files

memstick: move the dereference below the NULL test

The dereference should be moved below the NULL test.

spatch with a semantic match is used to found this.

Signed-off-by: default avatarWei Yongjun <>
Cc: Maxim Levitsky <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 507063b2
......@@ -454,7 +454,7 @@ static int r592_transfer_fifo_pio(struct r592_device *dev)
/* Executes one TPC (data is read/written from small or large fifo) */
static void r592_execute_tpc(struct r592_device *dev)
bool is_write = dev->req->tpc >= MS_TPC_SET_RW_REG_ADRS;
bool is_write;
int len, error;
u32 status, reg;
......@@ -463,6 +463,7 @@ static void r592_execute_tpc(struct r592_device *dev)
is_write = dev->req->tpc >= MS_TPC_SET_RW_REG_ADRS;
len = dev->req->long_data ?
dev->req->sg.length : dev->req->data_len;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment