[PATCH 2/2] powerpc/ps3: make system bus's remove and shutdown callbacks return void

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Nov 27 04:44:35 AEDT 2020


[dropped a few lists from Cc: that are off-topic for this mail]

Hello,

while creating this patch series I looked at ps3_system_bus_shutdown().
I think the BUG_ON(!drv) in (now) line 422 can be easily triggered when
there is a device without driver. (Try unbinding via sysfs before
shutdown.)

Also the BUG in (now) line 437 seems possible to trigger. Consider a
driver that doesn't have the two callbacks, e.g. because there is
nothing special to do on shutdown and probe only used devm_* resources.

While at it, I find it surprising that the remove callback is called if
there is no shutdown callback.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20201126/a66cee96/attachment.sig>


More information about the Linuxppc-dev mailing list