Return-path: Received: from mgw-sa02.nokia.com ([147.243.1.48]:59136 "EHLO mgw-sa02.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751286Ab0HQFuK (ORCPT ); Tue, 17 Aug 2010 01:50:10 -0400 Subject: Re: [PATCH 10/16] drivers/net/wireless/wl12xx: Use available error codes From: Luciano Coelho To: ext Julia Lawall Cc: "John W. Linville" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Tue, 17 Aug 2010 08:42:21 +0300 Message-ID: <1282023741.1773.9.camel@powerslave> Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, 2010-08-16 at 18:27 +0200, ext Julia Lawall wrote: > From: Julia Lawall > > Error codes are stored in ret, but the return value is always 0. Return > ret instead. > > The semantic match that finds this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @r@ > local idexpression x; > constant C; > @@ > > if (...) { ... > x = -C > ... when != x > ( > return <+...x...+>; > | > return NULL; > | > return; > | > * return ...; > ) > } > // > > Signed-off-by: Julia Lawall > > --- This was indeed a bug. Thanks! Acked-by: Luciano Coelho -- Cheers, Luca.