lkml.org 
[lkml]   [2008]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] mpic_u3msi: mpic_u3msi: failed allocation unnoticed
Date
> bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may
> return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned.

> list_for_each_entry(entry, &pdev->msi_list, list) {
> hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1);
> - if (hwirq < 0) {
> + if (hwirq == -ENOMEM) {
> pr_debug("u3msi: failed allocating hwirq\n");
> return hwirq;
> }

Please test for _all_ error values, instead.


Segher



\
 
 \ /
  Last update: 2008-04-24 00:11    [W:0.240 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site