Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ffeca3e authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Martin K. Petersen
Browse files

imm: check parport_claim



parport_claim() can fail and we should be checking if we were able to
claim the port.

Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reviewed-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 797150b9
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -77,10 +77,11 @@ static void imm_wakeup(void *ref)

	spin_lock_irqsave(&arbitration_lock, flags);
	if (dev->wanted) {
		parport_claim(dev->dev);
		if (parport_claim(dev->dev) == 0) {
			got_it(dev);
			dev->wanted = 0;
		}
	}
	spin_unlock_irqrestore(&arbitration_lock, flags);
}