summaryrefslogtreecommitdiff
path: root/drivers/block/fsl_sata.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/fsl_sata.c')
-rw-r--r--drivers/block/fsl_sata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/fsl_sata.c b/drivers/block/fsl_sata.c
index e000ebff76..31f7fab8b4 100644
--- a/drivers/block/fsl_sata.c
+++ b/drivers/block/fsl_sata.c
@@ -124,7 +124,7 @@ int init_sata(int dev)
length = sizeof(struct cmd_hdr_tbl);
align = SATA_HC_CMD_HDR_TBL_ALIGN;
sata->cmd_hdr_tbl_offset = (void *)malloc(length + align);
- if (!sata) {
+ if (!sata->cmd_hdr_tbl_offset) {
printf("alloc the command header failed\n\r");
return -1;
}