lkml.org 
[lkml]   [2008]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] net: handle errors from device_rename
On Thu, 15 May 2008 16:41:40 +0800
Wang Chen <wangchen@cn.fujitsu.com> wrote:

> Stephen Hemminger said the following on 2008-5-15 9:15:
> > rollback:
> > - device_rename(&dev->dev, dev->name);
> > + err = device_rename(&dev->dev, dev->name);
> > + if (err) {
> > + memcpy(dev->name, oldname, IFNAMSIZ);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> no need, dev->name didn't change in device_rename().
>
> > + return err;
> > + }
> >

dev->name has already been changed before the call to device_rename,
so it needs to be set back read the whole code context.


\
 
 \ /
  Last update: 2008-05-15 22:11    [W:0.041 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site