Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248168
| From | Dave Goodell <dgoodell@cisco.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] usnic: corretly check failed allocation |
| Date | 2015-10-15 23:00 +0200 |
| Message-ID | <qjXN0-1dR-11@gated-at.bofh.it> (permalink) |
| References | <qjTzK-3md-61@gated-at.bofh.it> <qjUvM-4Ij-15@gated-at.bofh.it> <qjXN0-1dR-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Oct 15, 2015 at 01:41:06PM -0400, Insu Yun wrote:
> On Thu, Oct 15, 2015 at 1:17 PM, Dave Goodell (dgoodell) <dgoodell@cisco.com
> > wrote:
>
> > On Oct 15, 2015, at 11:27 AM, Insu Yun <wuninsu@gmail.com> wrote:
> > >
> > > us_ibdev->ufdev = usnic_fwd_dev_alloc(dev);
> > > - if (IS_ERR_OR_NULL(us_ibdev->ufdev)) {
> > > + if (!us_ibdev->ufdev) {
> > > usnic_err("Failed to alloc ufdev for %s with err %ld\n",
> > > pci_name(dev), PTR_ERR(us_ibdev->ufdev));
> >
> > This PTR_ERR and message make less sense now.
> >
>
> Do you think what is better? removing error code? or change
> PTR_ERR(us_ibdev->ufdev)
> to -EFAULT
I would write it as:
usnic_err("Failed to alloc ufdev for %s\n", pci_name(dev));
-Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] usnic: corretly check failed allocation Insu Yun <wuninsu@gmail.com> - 2015-10-15 18:30 +0200
Re: [PATCH] usnic: corretly check failed allocation "Dave Goodell (dgoodell)" <dgoodell@cisco.com> - 2015-10-15 19:30 +0200
Re: [PATCH] usnic: corretly check failed allocation Dave Goodell <dgoodell@cisco.com> - 2015-10-15 23:00 +0200
csiph-web