lkml.org 
[lkml]   [1999]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.2pre1 crashes with partition check

Ok, It may be me, but this looks a little redundant.

- if ((drive = get_info_ptr(i_rdev)) == NULL || drive->forced_geom)
+ drive = get_info_ptr(i_rdev);
+ if (!drive)
+ return 0;
+
+ if (drive->forced_geom) {
+ /* bombs otherwise /axboe */
+ if (drive == NULL)
+ return 0;

It looks like "drive" is being checked as a NULL pointer twice,
Once after it's a assigned a value, and then once again within the
"if" condition block. Is there a reason for this? I know axboe posted
the fix inside the condition, but the "if (!drive) { return 0; }" was
added also...

Please excuse me if I'm missing something really obvious.
I'm still trying to catch up on the mailing list, so I may
have overlooked something.

Brent M. Smith, <smitten@lagged.net>


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

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.025 / U:1.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site