Re: [patch] [media] rc: double unlock in rc_register_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan Carpenter wrote:
If change_protocol() fails and we goto out_raw, then it calls unlock
twice.

Gah, good catch, I gotta quit adding new bugs... ;)


I noticed that the other time we called change_protocol() we
held the &dev->lock, so I changed it to hold it here too.

Signed-off-by: Dan Carpenter<error27@xxxxxxxxx>
---
Compile tested only.


I've sanity-checked the code, and yeah, calling change_protocol() function pointers with the lock held should be perfectly fine here too. The change_protocol functions are device-driver-specific, and don't touch the core rc device lock.

Reviewed-by: Jarod Wilson <jarod@xxxxxxxxxx>
Acked-by: Jarod Wilson <jarod@xxxxxxxxxx>

--
Jarod Wilson
jarod@xxxxxxxxxx


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux