On Tue, Mar 21, 2017 at 01:37:12PM +1100, Tobin C. Harding wrote:
>  static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 
> address,
>                                   unsigned char *data, unsigned int size)
>  {
> -     int rc;
> +     int ret;
>       unsigned char *read_buf;
>  
>       read_buf = kmalloc(ROM_BUFF_SIZE, GFP_KERNEL);
>       if (!read_buf)
>               return -ENOMEM;
>  
> -     rc = ks7010_sdio_read(priv, address, read_buf, size);
> -     if (rc)
> +     ret = ks7010_sdio_read(priv, address, read_buf, size);
> +     if (ret)
>               goto err_free_read_buf;
>  
> -     rc = memcmp(data, read_buf, size);
> -     if (rc) {
> -             DPRINTK(0, "data compare error (%d)\n", rc);
> +     ret = memcmp(data, read_buf, size);
> +     if (ret) {

You didn't introduce this, but this is a bug.  memcpy() doesn't return
error codes.  Could you fix it in a follow on patch?

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to