carl9170: add missing return-value check
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 26 Dec 2010 17:21:53 +0000 (18:21 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Jan 2011 19:35:12 +0000 (14:35 -0500)
This patch adds a forgotten bail-out path.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/carl9170/phy.c

index 82bc81c4c9304253805ce43ad9c935121962dc0c..122e75ee8effa4edd3c0a540695bc54e5b6e0ae0 100644 (file)
@@ -1676,6 +1676,8 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
 
        err = carl9170_write_reg(ar, AR9170_PHY_REG_HEAVY_CLIP_ENABLE,
                                 0x200);
+       if (err)
+               return err;
 
        err = carl9170_init_rf_bank4_pwr(ar,
                channel->band == IEEE80211_BAND_5GHZ,