Re: 2.2pre1 crashes with partition check

Brent M. Smith (smitten@lagged.net)
Fri, 1 Jan 1999 11:19:43 -0800 (PST)


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/