On Tue, 2011-10-18 at 11:19 -0700, Bing Zhao wrote: > > @@ -1228,9 +1228,11 @@ static int mwifiex_pcie_event_complete(struct mwifiex_adapter *adapter, > > if (!skb) > > return 0; > > > > - if (rdptr >= MWIFIEX_MAX_EVT_BD) > > + if (rdptr >= MWIFIEX_MAX_EVT_BD) { > > dev_err(adapter->dev, "event_complete: Invalid rdptr 0x%x\n", > > rdptr); > > + return -EINVAL; > > Instead of returning directly, we should set the error code and go through the error handling: > ret = -EINVAL; > goto done; Are you sure? You don't go to error handling a few lines earlier. johannes -- 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