lkml.org 
[lkml]   [2019]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V2 1/1] can: sja1000: f81601: add Fintek F81601 support
Date
On Wed, 2019-07-24 at 13:19 +0800, Ji-Ze Hong (Peter Hong) wrote:
> Hi,
>
> Saeed Mahameed 於 2019/7/24 上午 05:38 寫道:
> > On Mon, 2019-07-22 at 14:22 +0800, Ji-Ze Hong (Peter Hong) wrote:
> > > This patch add support for Fintek PCIE to 2 CAN controller
> > > support
> > >
> > > Signed-off-by: Ji-Ze Hong (Peter Hong) <
> > > hpeter+linux_kernel@gmail.com
> > > ---
> > > Changelog:
> > > v2:
> > > 1: Fix comment on the spinlock with write access.
> > > 2: Use ARRAY_SIZE instead of F81601_PCI_MAX_CHAN.
> > > 3: Check the strap pin outside the loop.
> > > 4: Fix the cleanup issue in f81601_pci_add_card().
> > > 5: Remove unused "channels" in struct f81601_pci_card.
> > >
> > > drivers/net/can/sja1000/Kconfig | 8 ++
> > > drivers/net/can/sja1000/Makefile | 1 +
> > > drivers/net/can/sja1000/f81601.c | 215
> > >

[...]

> > >
> > > + /* Detect available channels */
> > > + for (i = 0; i < count; i++) {
> > > + dev = alloc_sja1000dev(0);
> > > + if (!dev) {
> > > + err = -ENOMEM;
> > > + goto failure_cleanup;
> > > + }
> > > +
> >
> > don't you need to rollback and cleanup/unregister previously
> > allocated
> > devs ?
> >
>
> I'll do cleanup when errors jump to failure_cleanup label and do
> f81601_pci_del_card().
>

Right !, thanks for the clarification.
\
 
 \ /
  Last update: 2019-07-24 21:48    [W:0.046 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site