You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/02/25 09:55:17 UTC

[GitHub] [mynewt-core] kasjer commented on a change in pull request #2501: hw: handle hal_spi_enable/disable errors

kasjer commented on a change in pull request #2501:
URL: https://github.com/apache/mynewt-core/pull/2501#discussion_r582683525



##########
File path: hw/drivers/flash/at45db/src/at45db.c
##########
@@ -446,7 +446,10 @@ at45db_init(const struct hal_flash *hal_flash_dev)
     }
 
     hal_spi_set_txrx_cb(dev->spi_num, NULL, NULL);
-    hal_spi_enable(dev->spi_num);
+    rc = hal_spi_enable(dev->spi_num);

Review comment:
       i would just return rc all the time since there is nothing to do after if (rc) statement




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org