summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorO-O-BOOK <[email protected]>2026-02-06 16:51:55 +0800
committerRbb666 <[email protected]>2026-02-11 14:51:46 +0800
commit9412a2899d08c3ef806accf0335bda2397c326de (patch)
treee842a877f5b25e32371227df256e330af090e379
parent9aff6f86469064f9a488ed62620a8d181eedc25e (diff)
[style][components/fal_rtt] misrac style
-rw-r--r--components/fal/src/fal_rtt.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/components/fal/src/fal_rtt.c b/components/fal/src/fal_rtt.c
index 077191e102..5f4492cf57 100644
--- a/components/fal/src/fal_rtt.c
+++ b/components/fal/src/fal_rtt.c
@@ -167,7 +167,8 @@ struct rt_device *fal_blk_device_create(const char *parition_name)
return NULL;
}
- if ((fal_flash = fal_flash_device_find(fal_part->flash_name)) == NULL)
+ fal_flash = fal_flash_device_find(fal_part->flash_name);
+ if (fal_flash == NULL)
{
LOG_E("Error: the flash device name (%s) is not found.", fal_part->flash_name);
return NULL;
@@ -309,7 +310,8 @@ struct rt_device *fal_mtd_nor_device_create(const char *parition_name)
return NULL;
}
- if ((fal_flash = fal_flash_device_find(fal_part->flash_name)) == NULL)
+ fal_flash = fal_flash_device_find(fal_part->flash_name);
+ if (fal_flash == NULL)
{
LOG_E("Error: the flash device name (%s) is not found.", fal_part->flash_name);
return NULL;
@@ -620,19 +622,24 @@ static void fal(rt_uint8_t argc, char **argv) {
if (argc >= 3)
{
char *dev_name = argv[2];
- if ((flash_dev = fal_flash_device_find(dev_name)) != NULL)
+ flash_dev = fal_flash_device_find(dev_name);
+ if (flash_dev != NULL)
{
part_dev = NULL;
}
- else if ((part_dev = fal_partition_find(dev_name)) != NULL)
- {
- flash_dev = NULL;
- }
else
{
- rt_kprintf("Device %s NOT found. Probe failed.\n", dev_name);
- flash_dev = NULL;
- part_dev = NULL;
+ part_dev = fal_partition_find(dev_name);
+ if (part_dev != NULL)
+ {
+ flash_dev = NULL;
+ }
+ else
+ {
+ rt_kprintf("Device %s NOT found. Probe failed.\n", dev_name);
+ flash_dev = NULL;
+ part_dev = NULL;
+ }
}
}