Lines Matching defs:ret
58 int ret;
60 ret = spi_flash_cmd(CMD_READ_ID, id, SPI_FLASH_MAX_ID_LEN);
61 if (ret < 0) {
62 ERROR("SF: Error %d reading JEDEC ID\n", ret);
89 int ret;
94 ret = spi_flash_cmd_read(&cmd, 1, &status, 1);
95 if (ret < 0) {
105 ret = -1;
111 return ret;
118 int ret;
120 ret = spi_flash_cmd_write_enable(flash);
121 if (ret < 0) {
123 return ret;
126 ret = spi_flash_cmd_write(cmd, cmd_len, buf, buf_len);
127 if (ret < 0) {
129 return ret;
132 ret = spi_flash_cmd_wait(flash);
133 if (ret < 0) {
135 return ret;
138 return ret;
144 int ret;
146 ret = spi_flash_cmd_read(cmd, cmd_len, data, data_len);
147 if (ret < 0) {
149 return ret;
152 return ret;
160 int ret;
162 ret = spi_claim_bus();
163 if (ret) {
165 return ret;
174 ret = spi_flash_read_common(cmd, sizeof(cmd), data, read_len);
175 if (ret < 0) {
187 return ret;
197 int ret;
199 ret = spi_claim_bus();
200 if (ret) {
202 return ret;
219 ret = spi_flash_write_common(flash, cmd, sizeof(cmd),
221 if (ret < 0) {
231 return ret;
238 int ret;
247 ret = spi_claim_bus();
248 if (ret) {
250 return ret;
261 ret = spi_flash_write_common(flash, cmd, sizeof(cmd), NULL, 0);
262 if (ret < 0) {
273 return ret;
279 int ret;
281 ret = spi_claim_bus();
282 if (ret) {
285 return ret;
307 return ret;