ALSA: cs4236: fix pnp_irq() error handling
Subsystems (2)
PATCH 2/2 ALSA: cs4236: fix pnp_irq() error handling
pnp_irq() returns an unsigned value so the error handling here doesn't work. I recently introduced a IORESOURCE_INVALID define to make this less confusing.
Signed-off-by Dan Carpenter <[email protected]>
---
This needs [patch 1/2] or it won't compile. Can both patches go through Andrew's tree?
sound/isa/cs423x/cs4236.c +2 -1
@@ -293,7 +293,8 @@ static int snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev) }else { mpu_port[dev] =pnp_port_start (pdev,0 );if (mpu_irq[dev] >=0 && -pnp_irq_valid (pdev,0 ) &&pnp_irq (pdev,0 ) >=0 ) { +pnp_irq_valid (pdev,0 ) && +pnp_irq (pdev,0 ) !=IORESOURCE_INVALID ) { mpu_irq[dev] =pnp_irq (pdev,0 ); }else { mpu_irq[dev] =-1 ;/* disable interrupt */