From: John W. Linville Date: Wed, 26 Mar 2008 19:21:33 +0000 (-0400) Subject: prism54: correct thinko in "prism54: Convert stats_sem in a mutex" X-Git-Tag: v2.6.26-rc1~1138^2~291^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8dd62822ddbf6a9314e9b92a3816c04490c91293;p=platform%2Fkernel%2Flinux-3.10.git prism54: correct thinko in "prism54: Convert stats_sem in a mutex" mutex_trylock has different return code semantics than down_trylock... Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 2d91a56..2e25e19 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c @@ -218,7 +218,7 @@ prism54_get_wireless_stats(struct net_device *ndev) islpci_private *priv = netdev_priv(ndev); /* If the stats are being updated return old data */ - if (mutex_trylock(&priv->stats_lock) == 0) { + if (mutex_trylock(&priv->stats_lock)) { memcpy(&priv->iwstatistics, &priv->local_iwstatistics, sizeof (struct iw_statistics)); /* They won't be marked updated for the next time */