Skip to content

Commit

Permalink
xen/events: drop negativity check of unsigned parameter
Browse files Browse the repository at this point in the history
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80531
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
  • Loading branch information
Andrey Utkin authored and David Vrabel committed Aug 1, 2014
1 parent 3fbdf63 commit 474b8fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/events/events_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static void xen_irq_info_cleanup(struct irq_info *info)
*/
unsigned int evtchn_from_irq(unsigned irq)
{
if (unlikely(WARN(irq < 0 || irq >= nr_irqs, "Invalid irq %d!\n", irq)))
if (unlikely(WARN(irq >= nr_irqs, "Invalid irq %d!\n", irq)))
return 0;

return info_for_irq(irq)->evtchn;
Expand Down

0 comments on commit 474b8fe

Please sign in to comment.