]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
wl1251: wl12xx_get_platform_data() returns an ERR_PTR
authorDan Carpenter <error27@gmail.com>
Sat, 18 Dec 2010 08:52:10 +0000 (11:52 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 20 Dec 2010 19:49:49 +0000 (14:49 -0500)
wl12xx_get_platform_data() returns an ERR_PTR on failure and it never
returns a NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl1251/sdio.c

index 596d90ecba33c6027c1e8be64e41ce8c15cf31a6..d550b5e68d3cbea24ff262ea3766d01ef901f940 100644 (file)
@@ -252,7 +252,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
        wl->if_ops = &wl1251_sdio_ops;
 
        wl12xx_board_data = wl12xx_get_platform_data();
-       if (wl12xx_board_data != NULL) {
+       if (!IS_ERR(wl12xx_board_data)) {
                wl->set_power = wl12xx_board_data->set_power;
                wl->irq = wl12xx_board_data->irq;
                wl->use_eeprom = wl12xx_board_data->use_eeprom;