Tudor Ambarus 9326b4e078
mtd: spi-nor: Move condition to avoid a NULL check
When the controller is not under the SPI-MEM interface it may implement
the optional controller_ops->erase() method.

nor->spimem and nor->controller_ops are mutually exclusive. Move the
nor->controller_ops->erase != NULL check as an 'else if' case to
nor->spimem, in order to avoid the nor->controller_ops != NULL
check.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-11-11 20:42:52 +02:00
..
2019-09-15 23:50:50 +02:00
2018-06-12 16:19:22 -07:00
2019-09-15 23:50:50 +02:00
2019-09-15 23:50:50 +02:00
2019-09-05 14:34:26 -04:00