1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

change pointer check order

This commit is contained in:
Ralph Metzler 2017-07-11 20:20:39 +02:00
parent 452771913e
commit 8c46d9a86a

View File

@ -498,9 +498,9 @@ static int ddb_redirect(u32 i, u32 p)
struct ddb *pdev = ddbs[(p >> 4) & 0x3f];
struct ddb_port *port;
if (!idev->has_dma || !pdev->has_dma)
if (!pdev || !idev)
return -EINVAL;
if (!idev || !pdev)
if (!pdev->has_dma || !idev->has_dma)
return -EINVAL;
port = &pdev->port[p & 0x0f];