On 20/02/2020 10:01, Bartosz Golaszewski wrote:
You freed nvmem just before this statement, how can nvmem->wp_gpio be still be valid?- if (IS_ERR(nvmem->wp_gpio)) + if (IS_ERR(nvmem->wp_gpio)) { + ida_simple_remove(&nvmem_ida, nvmem->id); + kfree(nvmem); return ERR_CAST(nvmem->wp_gpio);
Are you able to test this changes at your end? Or these are just compile tested? --srini
+ }