wl1251: wl12xx_get_platform_data() returns an ERR_PTR
Subsystems (2)
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.
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/wireless/wl1251/sdio.c +1 -1
@@ -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;
Quoted 2 lines · Dan Carpenter
wl12xx_get_platform_data()returns anERR_PTRon failure and it never returns a NULL.
Yes, that's true. Good that you found this.
Quoted 1 line
Signed-off-by Dan Carpenter <[email protected]>
Acked-by Kalle Valo <[email protected]>
Signature · 1 line
Kalle Valo