From b9b2008bbff49e2714491a95109e1189e54a6491 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 14 Nov 2011 17:50:53 +0100 Subject: block: dma_bdrv_* does not return NULL Initially attempted with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = ( dma_bdrv_io | dma_bdrv_read | dma_bdrv_write ) (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however did not match anything. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/ide/macio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/ide/macio.c') diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 40f60f018e..abbc41b59e 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -152,10 +152,8 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) ide_issue_trim, pmac_ide_transfer_cb, s, true); break; } - - if (!m->aiocb) - pmac_ide_transfer_cb(io, -1); return; + done: if (s->dma_cmd == IDE_DMA_READ || s->dma_cmd == IDE_DMA_WRITE) { bdrv_acct_done(s->bs, &s->acct); -- cgit v1.2.3