It took a bit of time and effort to fix the Sunny, but Luffy and co. come rushing in.
Luffy, Law and Kid go ham and chaos ensues.
In the midst of all this chaos, Kyoshiro appears and reveals that he is Denjiro.
By gaining the trust of his underlings and Orochi, he's come as aid together with the samurai that have been released from jail.
Also the military forces that were thought to have sunk are all safe and it seems only the ships that were not needed were destroyed.
The reason for this was because Denjiro thought that Kinemon purposely misread Yasu's picture puzzle as he (Kinemon) guessed that there was spy/informant amongst them, but it seems Kinemon was simply just mistaken.