Skip to contentSkip to conversation

wl1251: wl12xx_get_platform_data() returns an ERR_PTR

PATCH In review Dan Carpenter 2 participants 2 messages Dec 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wl1251: wl12xx_get_platform_data() returns an ERR_PTR

wl12xx_get_platform_data() returns an ERR_PTR on failure and it never returns a NULL.

drivers/net/wireless/wl1251/sdio.c +1 -1
index 596d90e..d550b5e 100644
@@ -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;