Skip to content

Commit

Permalink
essl: fix logical bug in argument check
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Mar 14, 2022
1 parent 0fe3281 commit 6a4a6d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
20 changes: 6 additions & 14 deletions components/esp_serial_slave_link/essl_sdio.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/

#include "essl_sdio.h"
#include "esp_log.h"
Expand Down Expand Up @@ -206,7 +198,7 @@ esp_err_t essl_sdio_init(void *arg, uint32_t wait_ms)
ESP_LOGD(TAG, "Function 0 BS: %04x", (int) bs_read);

// Set block sizes for functions 1 to given value (default value = 512).
if (ctx->block_size > 0 || ctx->block_size <= 2048) {
if (ctx->block_size > 0 && ctx->block_size <= 2048) {
bs = ctx->block_size;
} else {
bs = 512;
Expand Down
1 change: 0 additions & 1 deletion tools/ci/check_copyright_ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ components/esp_rom/test/test_miniz.c
components/esp_rom/test/test_tjpgd.c
components/esp_serial_slave_link/essl.c
components/esp_serial_slave_link/essl_internal.h
components/esp_serial_slave_link/essl_sdio.c
components/esp_serial_slave_link/include/esp_serial_slave_link/essl.h
components/esp_serial_slave_link/include/esp_serial_slave_link/essl_sdio.h
components/esp_serial_slave_link/include/esp_serial_slave_link/essl_spi.h
Expand Down

0 comments on commit 6a4a6d5

Please sign in to comment.