lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scsi: sd: call device_del() if device_add_disk() fails
> The temptation was to call device_unregister() which is a combined
> device_del(); device_put(); but when the device_initialize() and
> device_add() are called separately, then I think it is more readable to
> call del and put separately as well.

I think we should also consolidate the initialization side. Using
device_register and device_unregister would have prevented this bug
and I should have switched to that before refactoring the code.

\
 
 \ /
  Last update: 2022-03-31 07:48    [W:0.121 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site