On Tue, May 19, 2015 at 10:55:32AM -0700, Brian Norris wrote:
> On Tue, May 19, 2015 at 10:34:56AM +0300, Boaz Harrosh wrote:
> > boaz> So by this stage res can only be == 0. So we should just do:
> > 
> >     if (err)
> >     /* The partition is unrecognized. So report I/O errors if there were 
> > any */
> > -           res = err;
> 
> ^^ You don't want to kill this line, since we still return ERR_PRT(res).
> But otherwise, I think you're right.
> 
> > -   if (res) {
> > -           strlcat(state->pp_buf,
> > -                   " unable to read partition table\n", PAGE_SIZE);
> > -           printk(KERN_INFO "%s", state->pp_buf);
> > -   }
> > +           printk(KERN_INFO "%s unable to read partition table\n",
> > +                  state->pp_buf);
> >  
> >     free_page((unsigned long)state->pp_buf);
> >     free_partitions(state);
> >     return ERR_PTR(res);

Or rather, just make the above line:

        return ERR_PTR(err);

> >  }

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to