lkml.org 
[lkml]   [2014]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH 1/1] driver:mtd:spi-nor: Add Micron quad I/O support
    Date
    >> +	/* set EVCR ,enable quad I/O */
    >> + nor->cmd_buf[0] = val & ~EVCR_QUAD_EN_MICRON;
    >> + ret = nor->write_reg(nor, SPINOR_OP_WD_EVCR, nor->cmd_buf, 1, 0);
    >> + if (ret < 0) {
    >> + dev_err(nor->dev,
    >> + "error while writing EVCR register\n");
    >> + return -EINVAL;
    >> + }
    >> +
    >> + if (wait_till_ready(nor))
    >> + return 1;

    >Why does this not return proper error code or even better, return value from
    >wait_till_ready() ?
    >
    >Other than that, there's nothing wrong with the patch I think.

    Hi,Marek
    Thanks for your review,you can find the same usage in the spi-nor.c.
    Below method is OK? Or you can give me some suggestion.

    if (wait_till_ready(nor))
    return - EINVAL;


    \
     
     \ /
      Last update: 2014-09-26 11:21    [W:2.163 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site